• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Called script won't store property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Called script won't store property


  • Subject: Re: Called script won't store property
  • From: Neil Faiman <email@hidden>
  • Date: Sun, 27 Feb 2005 15:58:41 -0500

When you double-click the script, it actually runs the application, and changes are saved in the application file. When you "run script" from another script, it effectively loads the script from the file and runs it, but it doesn't run the script application.

You could always do

	tell application "Rachel:TestScriptCalled" to run

which would run the application, the same as double-clicking it; but of course, then you wouldn't get the result back in the calling script.

	-Neil Faiman

On Feb 27, 2005, at 3:33 PM, Gnarlodious wrote:


TestScriptCalling:

run script "Rachel:TestScriptCalled"
display dialog the result


TestScriptCalled:

property someVariable : missing value
if someVariable is missing value then display dialog "first run"

set someVariable to "Script initialized"
return someVariable


Both are saved "as applications". When I run TestScriptCalled by doubleclicking it remembers the property value. When I call it from TestScriptCalling it can't remember the property.

Why not and what's the trick?


-- Gnarlie "Deftly they opened the brain of a child, and it was full of flying dreams."
~ Stanley Kunitz

_______________________________________________ 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
References: 
 >Called script won't store property (From: Gnarlodious <email@hidden>)

  • Prev by Date: Re: Text View -- NSReceiverEvaluatorScriptError: 4(1)
  • Next by Date: Re: Called script won't store property
  • Previous by thread: Called script won't store property
  • Next by thread: Re: Called script won't store property
  • Index(es):
    • Date
    • Thread