[X-Unix] Hiding apps from the command line

Simon Forster simon-lists at ldml.com
Fri Mar 26 08:05:37 PST 2004


On 26 Mar 2004, at 15:19, Kirk McElhearn wrote:

>> The error seems to get thrown if the second command line arg is not
>> given - whether it's needed or not.
>
> I still get it, even if I add another argument.

What error? "syntax error: No user interaction allowed. (-1713)"?

>> # hide -x           - shows terminal
>
> Why? Since you're typing this from Terminal, it shouldn't matter.

If I'm in the terminal and want to hide all apps except Mail but still 
keep terminal showing, hide -ox Mail does this for me. Though it'd 
probably be better to just allow you to specify multiple arguments for 
the -o command.

I'd decided to change the script so the commands were additive - 
although most of them are mutually exclusive so it was a waste of time 
- until I added the -x switch.

> I wonder if the "begins with" and "contains" is any better/faster than
> simply "is -o" etc.?

Additive switches.

>> if "$1" contains "x" then tell application "Terminal" to activate
>> else if exists application process "$1" then
>> set visible of application process "$1" to false
>
> This part's not working for me...

Hmm. Once again I need to supply 2 arguments. hide Mail Mail for 
example works (for me).

Simon Forster
_____________________________________________________
  LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
  Tel: +44 (0)70 9230 5244   Fax: +44 (0)70 9230 5247
_____________________________________________________



More information about the X-Unix mailing list