• 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
Re: GURU question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GURU question


  • Subject: Re: GURU question
  • From: Robert Poland <email@hidden>
  • Date: Thu, 24 Nov 2011 09:20:53 -0700

Thanks Yvan,

In other words

  window "Tools"

is shorthand for

if exists window "Tools"
end if


On Nov 24, 2011, at 8:49 AM, KOENIG Yvan wrote:

> Le 24 nov. 2011 à 15:51, Robert Poland a écrit :
>
>> Hi,
>>
>> I'm seeing this more and more lately.
>>
>> The statement "window "Tools" is new to me.
>>
>> Could someone explain the logic behind it.
>>
>> activate application "GraphicConverter"
>> tell application "System Events"
>>  tell process "GraphicConverter"
>>      try
>>          window "Tools"
> No need to be a GURU to explain.
> this instruction try to find a window entitled "Tools" among those open by the app.
>>      on error
> we are here if there is no such window so trigger the shortcut cmd + k to open it.
>>          keystroke "k" using command down
>>      end try
> Here, the window "Tools" is open so the script may work upon it
>>      tell window "Tools"
>>          set position to {500, 500}
>>      end tell -- window
>>  end tell -- process
>> end tell -- System Events
>
> Yvan KOENIG (VALLAURIS, France)  jeudi 24 janvier 2011 16:48:45

Robert Poland - Fort Collins, CO



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >GURU question (From: Robert Poland <email@hidden>)
 >Re: GURU question (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: GURU question
  • Next by Date: looking for regex help
  • Previous by thread: Re: GURU question
  • Next by thread: looking for regex help
  • Index(es):
    • Date
    • Thread