Re: Script expects quoted text mystery
Re: Script expects quoted text mystery
- Subject: Re: Script expects quoted text mystery
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 15 Jan 2004 11:26:48 -0800
On 1/15/04 2:46 AM, "Shane Stanley" <email@hidden> wrote:
>
On Jan 15, 2004, at 7:04 PM, Paul Berkowitz wrote:
>
>
> It's not a good idea to nest one application block within another at
>
> the
>
> best of times
>
>
Why (apart from readability)? I know this seems to be accepted wisdom,
>
but when I run something like:
>
>
tell application "Finder"
>
name
>
tell application "InDesign CS"
>
name of document 1
>
end tell
>
end tell
>
>
The log says:
>
>
tell application "Finder"
>
get name
>
--> "Finder"
>
end tell
>
tell application "InDesign CS"
>
get name of document 1
>
--> "Untitled-18"
>
end tell
>
>
That suggests to me that AS is handling the situation fine. And I can't
>
detect any performance issues. I even tried making the outer app
>
unresponsive to events (leaving an open file dialog up) like so:
>
>
tell application "InDesign CS"
>
tell application "Finder"
>
name
>
end tell
>
end tell
>
>
And the call to the Finder worked fine.
>
I've noticed that too. So worries about confusion are perhaps needless. (I
do wonder if 'using terms from' might still be a special case, however.) But
I know that you are sending a call to the Finder to send a call to InDesign.
That probably doesn't matter at all if it occurs just once, but doing
something like that in a repeat loop would probably really jam things. Of
course, things might be so efficient in OS X that this is now less
significant than before - I wouldn't know.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.