SV: Creating preferences for an applescript application
SV: Creating preferences for an applescript application
- Subject: SV: Creating preferences for an applescript application
- From: Richard Rönnbäck <email@hidden>
- Date: Mon, 22 Nov 2004 19:44:44 +0100
If you like to use vanilla AppleScript you should look at "store script" and
"load script" commands in Standard additions
Try this, first save the script below AS AN APPLICATION and run it once
(don't skip this step)
try
get theString
on error
set theString to "This is my intial value"
end try
tell me to display dialog theString
Then make a second script like the following (changing the paths to reflect
where the first script is) (beware of line breaks)
set MyScript to load script alias "Macintosh
HD:Users:richardr:Desktop:theScript"
set theNewValue to text returned of (display dialog "please change the
value" default answer (theString of MyScript))
set theString of MyScript to theNewValue
store script MyScript in alias "Macintosh
HD:Users:richardr:Desktop:theScript" replacing yes
Now, run the second script to change the value of the first script, then run
the first script again and notice how it's setting has been changed
Rgds
Richard Rönnbäck
> Från: Bjorn Sodergren <email@hidden>
> Svara till: Bjorn Sodergren <email@hidden>
> Datum: Mon, 22 Nov 2004 10:42:31 -0600
> Till: Applescript List <email@hidden>
> Ämne: Creating preferences for an applescript application
>
> I wrote a couple of small applescript applications to assist us in the
> prepress area. However, i would like to make it easy for others to
> change some of the properties i use in the script (server, user/pass,
> directories)
>
> Does anyone know of some good docs or examples that will help me
> support this feature?
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> edband.net
>
> This email sent to email@hidden
_______________________________________________
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