Re: System Events: window id's instead of window names?
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