New to ASS and strugling with the default variables…
I want to be able to enter text in a text field “DataEntry”. When the app relaunches it should then enter the previously entered text in the same text field. However, my script seems to fail on me:
property default : "test"
on will finish launching theObject
make new default entry at end of default entries of user defaults with properties {name:"DataEntry", contents:default}
set default to contents of default entry "DataEntry" of user defaults
tell window of theObject
try
set contents of text field "DataEntry" of window "MainWindow" to default
end try
end tell
end will finish launching
on will quit theObject
set contents of default entry "DataEntry" of user defaults to default
end will quit
on clicked theObject
set contents of default entry "DataEntry" of user defaults to default
end clicked
Any help is appreciated…