this may be a stupid question, but is there an applescript that closes all open apps? i'm new to the whole applescript thing, thought about writing my own and don't have the faintest clue where to start. can anybody help me out?
nifty_nigel10 said:this may be a stupid question, but is there an applescript that closes all open apps? i'm new to the whole applescript thing, thought about writing my own and don't have the faintest clue where to start. can anybody help me out?
tell application "Safari"
quit
end tell
mduser63 said:It's not all that hard to write a script all open apps, though I'm too lazy to do it now. I did notice during the WWDC keynote that at one point, SJ said something like "Let's close out of all this" then clicked an AppleScript as he was moving on to something else following a demo.
elfin buddy said:I'm no AppleScript pro, but to get you started, here's a little piece of code that will quit Safari:
Code:tell application "Safari" quit end tell
Just replace Safari with the name of whatever other application you want to quit. That includes the Finder
tell application "Safari"
close every window
end tell
Soulstorm said:Code:tell application "Safari" close every window end tell
tell application "Finder"
set dock_app to the name of every process whose visible is true
end tell
repeat with num from 1 to number of items in the dock_app
set this_app to item num of the dock_app
if this_app is not "Finder" then
tell application this_app
quit
end tell
end if
end repeat
My script is that bad, huh?Eraserhead said:This link is for a PDF called Applescript for Absolute Starters which is excellent if you are a total applescript beginner.
Not at all, your script is actually useful! Just a 100 page pdf is more comprehensive .Unorthodox said:My script is that bad, huh?