• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Substituting a variable in UI scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Substituting a variable in UI scripting


  • Subject: Substituting a variable in UI scripting
  • From: Brett Conlon <email@hidden>
  • Date: Tue, 10 Jan 2006 15:02:28 +1000


Heya,

How would one make the following work:

if OSVersion contains "10.4" then
        set UIV to "6"
else if OSVersion contains "10.3" then
        set UIV to "3"
end if
click pop up button 3 of UI element 1 of UI element UIV of window "Print"
and so on....

Rather than have a series of UI lines repeated twice in the script I was hoping to set the variable UIV at the beginning (eg, 3 to 6) and just substitute the variable when needed in the UI line.

It states the variable is not defined when run.

The above is part of a System Events, FreeHand process tell.

Cheers,

Cojcolds
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Substituting a variable in UI scripting
      • From: ME <email@hidden>
  • Prev by Date: Testing for last process used
  • Next by Date: Re: Substituting a variable in UI scripting
  • Previous by thread: Re: Testing for last process used
  • Next by thread: Re: Substituting a variable in UI scripting
  • Index(es):
    • Date
    • Thread