On Fri, Mar 26, 2004 at 01:53:54PM +0000, David Ledger wrote: : Kirk McElhearn responded: : >On 3/25/04 10:59 AM, "Eugene Lee" wrote: : > : >> $ osascript -e 'tell application "Finder"' : >> -e 'if exists application process "Mail" then set visible of application process "Mail" to false' : >> -e 'end tell' : >> : >> Transforming this mess into a nice shell script command is left as an : >> exercise to the gentle reader... : > : >Eugene, : > : >Very nice! : > : >I'm working with Rob Griffiths to update his OS X Hints book - would you : >mind if I included this? : > : >Re a shell script... I was expecting this to work, but I'm not very much up : >on AppleScript I assume the $1 doesn't work with AS... : > : >#! /bin/sh : ># hide an application in the Finder : >osascript : >tell application "Finder" : >if exists application process "$1" : >then set visible of application process "$1" to false : >end if : >end tell : : Working (for me) version at : <http://homepage.mac.com/david_ledger/Scripts/index.html> Oh gawd, we already have code forks... As a joke, maybe we should have a impromptu shell script writing contest and see who can pump out the best command-line tool to hide/show a faced application in OS X. Code may be judged on the number of features, ease of use, robustness, and other nonsensical bits. All submissions may use commands available in shipping versions of OS X, especially those in the the Developer Tools CD. If it didn't come with OS X, it cannot be used. Thoughts? -- Eugene Lee http://www.coxar.pwp.blueyonder.co.uk/