I'm on an efficiency kick, and am revising many of my scripts and have several questions.
Question 1 ----------
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
I realize in the grand scheme of things that a one time execution probably doesn't matter but if this was in a loop for a folder that had hundreds of files, would it matter?
Question 2 ----------
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?
Question 3 ----------
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?
TIA
Jim Brandt
|