Reading/writing a "pref" file?
Reading/writing a "pref" file?
- Subject: Reading/writing a "pref" file?
- From: "Aaron Grant" <email@hidden>
- Date: Tue, 16 May 2006 18:57:35 -0700
I've cobbled together a small AppleScript app to enable defaults in
Backup that's working well, but would someone be able help me with
making the app look for the existence of, read from and write to a
"pref" file? The file would need to have one of two different text
strings written to it. Below is the script I have so far:
display dialog "Some text goes here" default button 1 buttons {"Turn
Stuff On", "Turn Stuff Off", "Cancel"} with icon note
if button returned of result is "Turn Stuff On" then
do shell script "defaults write YES"
display dialog "Stuff is turned on." default button 1 buttons {"OK"}
with icon note
if button returned of result is "OK" then
display dialog "Warning text goes here." default button 1 buttons
{"OK"} with icon caution
else if button returned of result is "OK" then
end if
else if button returned of result is "Turn Stuff Off" then
do shell script "defaults write NO"
else if button returned of result is "Cancel" then
exit repeat
end if
Thanks for any help you can provide.
Aaron
_______________________________________________
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