How to make a script

lamina

macrumors 68000
Original poster
Mar 9, 2006
1,758
41
Niagara
The dock sometimes crashes on my iMac, and I don't want my family to have to go to terminal and type killall Dock, so is there a way I can make a script file that they can double-click on the desktop to run that command?
 

gauchogolfer

macrumors 603
Jan 28, 2005
5,556
5
American Riviera
Why not write an AppleScript with that exact command, and save it on the desktop as a self-contained script? Then they could double-click on it as you said.

Or, they could 'Force Quit' the dock from within Application Monitor.
 

beatsme

macrumors 65816
Oct 6, 2005
1,204
1
lamina said:
The dock sometimes crashes on my iMac, and I don't want my family to have to go to terminal and type killall Dock, so is there a way I can make a script file that they can double-click on the desktop to run that command?
open up Script Editor, and enter this:
tell application "Terminal"
activate
do script with command "killall Dock"
end tell
tell application "Terminal"
activate
do script with command "killall Terminal"
end tell


Save it as whatever you want. I named it "killDock"
This will open Terminal, kill the Dock, and close Terminal.