changing a script app's properties via another script
changing a script app's properties via another script
- Subject: changing a script app's properties via another script
- From: email@hidden (Michael Sullivan)
- Date: Wed, 8 May 2002 15:36:55 -0400
- Organization: Society for the Incurably Pompous
Can this be done?
Basically, I'm looking to distribute a run only app which will have
certain properties hard compiled that I don't expect to change and don't
want the user to be able to access willy nilly.
But they might conceivably change. In which case, I'd like to be able
to distribute another applet which will do the change.
Basically, I want to access my original script as if it were a
scriptable application: open it, run one of it's handlers, then quit
it. But I *don't* want to run the run handler, only this other handler
which does nothing more than update the properties.
Is this feasible? Or do I need to consider a different kind of
architecture to allow for this? I can think of many, but this is the
one I'd prefer.
here is an example:
-- begin file "Macintosh HD:runOnlyApp.app":
property kHardCode : "A"
on run()
--do stuff that doesn't ever change khardCode under any conditions
end run
on ChangeConfig(aString)
set kHardCode to aString
end ChangeConfig
-- end file "Macintosh HD:runOnlyApp.app":
-- begin file "Macintosh HD:Configurator"
on run()
tell application "Macintosh HD:runOnlyApp.app"
ChangeConfig("B")
end tell
end run
-- end file "Macintosh HD:Configurator"
Is something like this possible?
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.