Re: tell block targets
Re: tell block targets
- Subject: Re: tell block targets
- From: Shane Stanley <email@hidden>
- Date: Sun, 04 Dec 2011 13:43:22 +1100
On 03/12/2011, at 11:02 PM, Jim Brandt wrote:
> Is it more efficient to do this:
>
> tell application "Finder" to set nm to name of file filename
> tell application "Finder" to set cd to creation date of file filename
>
> vrs
>
> tell application "Finder
> set nm to name of file filename
> set cd to creation date of file filename
> end tell
They're identical.
> When you have a tell block that addresses an application (such as Finder), does AS direct every statement within that block to that application, or are only the statements that require that applications attention directed there?
>
> i.e.
>
> set filename to "abc"
>
> tell application "Finder"
> set nm to name of file "abc"
> end tell
>
> vrs
>
> tell application "Finder"
> set filename to "abc"
> set nm to name of file "abc"
> end tell
>
> is the statement 'set filename to "abc" ' directed to the Finder vrs being performed by AS?
No, it's not sent to the Finder.
> When a script is launched via the script menu, is "Script Runner" the default "application" controlling the script? If the script is a run-a-way (say I put it in an infinite loop by mistake) is there an application I can force-quit the will then kill the running of the script?
You can probably test this yourself in less time than it took to type the question.
--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>
_______________________________________________
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