Re: Called script won't store property
Re: Called script won't store property
- Subject: Re: Called script won't store property
- From: kai <email@hidden>
- Date: Mon, 28 Feb 2005 20:47:26 +0000
On Mon, 28 Feb 2005 13:03:40 -0700, Gnarlodious wrote:
set scriptFile to alias "path:to:required:script.app" -- modify as
required
set s to (load script scriptFile)
set scriptResult to run s
store script s in scriptFile replacing yes
display dialog scriptResult
Thanks kai, "load script" is what I was looking for.
Added bonus; the script runs invisibly, that is, no app shows in the
Dock
while running.
Glad to hear it did the trick, Gnarlie. :-)
Nevertheless, we can observe a difference when something like this is
included in the "calledApplet".
-------------------------
tell application "Finder" to set myName to name of (path to me)
display dialog "This script is being run by " & myName & "."
--> [on double-clicking the "calledApplet" file:] "This script is
being
run by calledApplet."
--> [on running script from the "callingApplet":] "This script is
being
run by callingApplet."
Thanks for pointing that out. Wonder if this is the result of a
potential
bug?
Personally, I don't believe it is. My interpretation is that the
dialogs merely confirm which application is running the script - not
necessarily the source of it. In a similar way, 'path to me' returns
Script Editor (when a script is run from there) and System Events (when
a compiled script is run from the Scripts Menu).
(Oh yeah... one final caveat: I'm currently testing in 10.2.8 - so
your experience may vary.)
Seems to work in 10.3.7
Thank goodness! Maybe it's time for me to move there... ;-)
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden