Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'I use oascript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I use oascript
Authored by: fracai on Jul 12, '06 09:35:10AM

I don't have it at hand, but I use a shell script and calls to oascript to run the following (from memory)

tell application "<app name>" to activate

or something like that.
Of course the final script takes the first argument as the App Name.
that way you can just run "launch Mail" without cluttering your environment with aliases.

I have the same for quitting apps. Very handy when I want to remotely cleanly kill an app. killall -2 "<app>" might work as well, but I don't know that that signal is as clean in the GUI. something to check out I guess.

---
i am jack's amusing sig file



[ Reply to This | # ]
The main advantage of this
Authored by: porkchop_d_clown on Jul 12, '06 07:46:03PM

is that you get command line completion. Another advantage is that you don't have to deal with remembering to deal with spaces in app names and so on.



---
Everyone loves a clown, but no one will lend him money!



[ Reply to This | # ]