Hello,
I am a newbie to AppleScript (only messed around with the Record feature on System 7 before), and this is my first post on this forum!
I just made a script, copying some code from a forum ( http://forums.macrumors.com/showthread.php?t=275858 ) and putting in some of my own (barely any). It freezes Script Editor when I run it and I have to hide and show Script Editor and wait for it to finish. It does not show the error dialog that I have put in the code.
Here is the script:
set white_list to {"Finder", "iTunes"}
try
tell application "Finder"
set process_list to the name of every process whose visible is false
end tell
repeat with i from 1 to (number of items in process_list)
set this_process to item i of the process_list
if this_process is not in white_list then
tell application this_process
quit
end tell
end if
end repeat
on error
display dialog "There was an error quitting the application" + this_process + "." buttons {"Quit"} default button 1
error number -1
end try
AppleScript: AppleScript 20.1; Script Editor v2.2.1 (100.1)
Browser: Safari 525.20) OmniWeb/v622.6.0.109966
Operating System: Mac OS X (10.5)