How Can I Access Properties of Script Applications?
How Can I Access Properties of Script Applications?
- Subject: How Can I Access Properties of Script Applications?
- From: "S. J. Cunningham" <email@hidden>
- Date: Mon, 09 Mar 2015 06:34:13 -0400
I have a script application, call it "ThePropertyManager" viz:
------------------------
property sampleProperty : ""
on setProperty(newValue)
set oldValue to sampleProperty
set sampleProperty to newValue
return {oldValue, sampleProperty}
end setProperty
on run
set sampleProperty to "x"
end run
-----------------------------
When it is running I can access it's handlers from another script but not it's properties.
set thePropertyManager to (hfs path to ThePropertyManager.app)
tell application thePropertyManager to setProperty("z") --> {"x","z"}
get sampleProperty of application thePropertyManager --> Error:"ThePropertyManager got an error: Can’t get sampleProperty."
It seems odd that I should be able to do the one but not the other. Is there some way to directly access the properties of a running script application similar to the way you can with a script object?
What I am trying to do is to use a script application as a vehicle to store information which can then be available to any other scripts rather than writing the information to a file with all the associated read/write overhead. I'm running Snow Leopard, Applescript version 2.1.2.
_______________________________________________
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