Re: Tell Blocks Considered Harmful (was Re: open for access)
Re: Tell Blocks Considered Harmful (was Re: open for access)
- Subject: Re: Tell Blocks Considered Harmful (was Re: open for access)
- From: Rick Gordon <email@hidden>
- Date: Tue, 16 Dec 2008 21:18:54 -0800
Is the code below interpreted as nested, or does the "root" variable allow it to bypass. It does what I really want, which is that the dialog appears in the current frontmost application.
set root to me
tell application "Adobe InDesign CS3"
tell active document
tell root to display dialog "Boo!"
end tell
end tell
------------------
On 12/16/08 at 9:05 PM -0800, Rick Gordon wrote in a message entitled
"Re: Tell Blocks Considered Harmful (was Re: open for access":
>I found that that code ...
>
>tell application "Adobe InDesign CS3"
> tell active document
> -- ...
>my display dialog "Boo!"
> -- ...
> end tell
>end tell
>
>... when run from Script Editor, still activates InDesign before displaying the dialog, while this code ...
>
>tell application "Adobe InDesign CS3"
> tell active document
> -- ...
> end tell
>end tell
>display dialog "Boo!"
>tell application "Adobe InDesign CS3"
> tell active document
> -- ...
> end tell
>end tell
>
>... opens the dialog in Script Editor (when run from within Script Editor).
>
>I want to get the efficiency of not burdening the calling application with OSAX calls, and get the effect of the second snippet without the verbosity.
>
>Why doesn't the first snippet work like the second, if the "my" pulls the scope out of the application domain?
--
___________________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________
WWW: http://www.shelterpub.com
_______________________________________________
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