Here you go. Change the path to your folder in the preferences… always use : instead of / & change Your_App to the app you want to open.
Tell application "Finder" to delete folder(*usersHDname*:classic:System Folder:Preferences:*foldername*)
tell application "*Your_App*" to activate
quit
This will delete the folder of your choice and then activate your app. I assume you want this script so that you dont have to delete the pref folder every time you run the app. To use it that way, save the script as an application and from now on when you want to run that app, double click this script app and it will do it’s thing.
Now aint that easy,
JO
one question: is there a way to have a wild card or something so i don’t need a different script for each machine? or just make sure all their hd’s are named the same, like ‘macintosh hd’… same with the path to the app
ok i am a complete newb to applescript and got syntax errors all around with this code - of the many things it doesn’t like, is the space in ‘macintosh hd’, and the “:” that seperate the path
The path to the application doesn’t matter, just enter the correct name, and the Finder will do his thing. I have changed the previous script to comply with all you wanted.
When you open it in Script Editor, replace “YourFolder” with the correct name for the folder, and “YourApp” with the name for the application. Then save this script as an application (executable only) and you’re done.
ok cool - i was messing with the first script, and while i could get it to do everything, once the classic app opened (and subsequently waited for an appropriate choice in the immediate dialog box it displayed), it would lock up
with the second script everything works fine. question: is osX applescript capable of navigating through classic app dialog boxes? or is this up to the user to do?