I am wondering if I can be able to make my application read a plist file by doing this:
set manifest to ""
set prefs to "com.manifest.text"
try
set texts to (do shell script "defaults read " & prefs & " text")
on error F
if F contains " does not exist" then
set manifest to text returned of (display dialog "No text stored. Please put text below to be saved." default answer "" buttons {"Cancel", "OK"} cancel button {"Cancel"} default button {"OK"} with title "Text.")
try
do shell script "defaults write " & prefs & " text " & quoted form of username
end try
end if
end try
if manifest is "" then
set manifest to texts
end if
set THE_TEXT to manifest as string
and then take the read data and see that it needs to do something again.
Browser: Safari 531.9
Operating System: Mac OS X (10.6)