Re: ?run script? best practices (was Application Script Menus)
Re: ?run script? best practices (was Application Script Menus)
- Subject: Re: ?run script? best practices (was Application Script Menus)
- From: "Nigel Garvey" <email@hidden>
- Date: Sun, 21 Dec 2008 13:12:57 +0000
Chris Page wrote on Sat, 20 Dec 2008 18:50:35 -0800:
>On Dec 20, 2008, at 5:35 AM, Nigel Garvey wrote:
>
>> Cross-process messaging time can be reduced quite a bit by
>> delegating communications to 'run script':
>>
>> script
>> tell application "Blah"
>> -- Do several interesting things.
>> end tell
>> end script
>>
>> run script result
>
>
>â?~run scriptâ?(TM) best practices:
>
>1. Don't send â?~run scriptâ?(TM) to another process unless the
>performance overhead is a serious impediment. Scripts aren't
>guaranteed to run correctly when sent to another process.
Hi, Chris. I'm not sure from your wording if you're objecting to my usage
here or simply footnoting it.
The idea is that the main script invokes 'run script' to run an
executable script object containing multiple commands for the target
application. This works much faster than sending the commands
individually from the main script, presumably because OSAX/application
communication is faster than script-application/target-application
communication. Is this what you mean by "send 'run script' to another
process"? (It doesn't involve using 'run script' in a 'tell' block.)
Besides the obvious fact that it's a hack, is it actually a dodgy thing to do?
NG
_______________________________________________
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