0th Annual Shell X-Unix Scripting Contest (was Re: [X4U] Terminal Comand to Hide App Layers)

Eugene Lee list-themacintoshguy at fsck.net
Fri Mar 26 13:04:01 PST 2004


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/



More information about the X-Unix mailing list