• 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: System Events: window id's instead of window names?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Events: window id's instead of window names?


  • Subject: Re: System Events: window id's instead of window names?
  • From: Thomas Fischer <email@hidden>
  • Date: Thu, 24 Jun 2010 09:04:58 +0200

> No. This is not puzzling, this is an error. There are two commands in one line

Do you mean error like bug?
Or a programming error?
The result doesn't change if I unravel the line to

set appName to "AppleScript Editor"
tell application "System Events"
	tell application appName
		get id of window 2
	end tell
end tell

> I assume that because of the first tell block, the second tell block is not seen as such.
> But I am not sure!

I don't know of any such limitation for nesting tell blocks in the documentation.

> The error that one gets is an error of System Events.
> If you change "application" to "process" there  is no error.
>
> Also, if the variable appname is changed then script runs ok:
>
> set appName to application "AppleScript Editor"
> tell application "System Events" to tell appName to get id of window 2
>

This I interpret as a hint that it is not the nesting itself but the combination of the evaluation of the variable with the call to the application that is not working.
Thus it  rather looks like a bug to me.

Thomas 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: System Events: window id's instead of window names?
      • From: Deivy Marck Petrescu <email@hidden>
References: 
 >System Events: window id's instead of window names? (From: Daniel Brown <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Thomas Fischer <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Deivy Marck Petrescu <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Thomas Fischer <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Deivy Marck Petrescu <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Thomas Fischer <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Tommy Bollman <email@hidden>)
 >Re: System Events: window id's instead of window names? (From: Deivy Marck Petrescu <email@hidden>)

  • Prev by Date: Re: System Events: window id's instead of window names?
  • Next by Date: Re: Detecting the minus sign in a string
  • Previous by thread: Re: System Events: window id's instead of window names?
  • Next by thread: Re: System Events: window id's instead of window names?
  • Index(es):
    • Date
    • Thread