Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iExplorer

macrumors newbie
Original poster
Dec 21, 2015
5
0
I want to use Automator to automatically close an application(if that application is open) when I click on Shut Down and then proceed to Shut Down.Is it possible?
 

Lunder89

macrumors 6502
Oct 16, 2014
392
129
Denmark
You can't run an automator action when shutting down your mac. But you can run a script inside automator to shut down your mac.
Create a new automator workflow, and use the action "Quit application" and select the application you want quitted. Then find the script action, and insert this:

tell application "Finder"

shut down

end tell

Save it all as an application. Run that application, to shut down the application, and turn off your Mac (I haven't tested the script, since I didn't want to shut down my mac at the time of writing this, but multiple sources recommends this :) )
 

iExplorer

macrumors newbie
Original poster
Dec 21, 2015
5
0
Thanks! Works like a charm! I was also wondering if I could assign a keyboard shortcut to this application? Would be super-useful.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.