Don’t you hate when people are unexpetedly peering over your shoulder to see what you are doing on your computer! Well, me too!
So… what I am looking to do is script the following commands…
Switch to finder… easy enough
Hide all apps - you know the Option, shift, H command - havne’t found an applescript command for this…
and minimize finder window. - easy enough.
So - does anyone know how to write out the Hide Other Apps command in Applescript?
tell application "Finder" to activate
tell application "System Events" to ¬
set visible of (every application process whose visible is true and name is not "Finder") to false
Yep, Finder can handle it but I’ve been lead to believe that Finder will simply pass the command off to System Events anyway. The way I see it, Finder has enough to do already so I’ll use System Events to carry some of the burden whenever possible. With that said, if the script needs to be backward compatible (pre-OS X), one should use the Finder.