Script to close all open programs
tell application "Firefox" to activate
tell application "System Events"
tell process "Firefox"
keystroke "q" using command down
delay 1
keystroke return
end tell
end tell
tell application "System Events"
set theProcesses to every process whose visible is true and name is not "Finder" and name is not (name of me)
end tell
repeat with i from 1 to (count of theProcesses)
set thisProcess to item i of theProcesses
try
tell application (name of thisProcess) to quit without saving
end try
end repeat
Powermac Dual 1.8 ghz G5, Mac OS X (10.4.11)