I want to type in Spotlight commands such as shutdown, reboot, suspend or lock and make it execute it, just like Alfred does.
How to make this possible with Spotlight?
I want to type in Spotlight commands such as shutdown, reboot, suspend or lock and make it execute it, just like Alfred does.
How to make this possible with Spotlight?
tell application "System Events" to shut downto shut down,tell application "loginwindow" to «event aevtrlgo»to log out, ordo shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"to lock the screen. – Lri Oct 31 '13 at 11:52