appswitch 1.1d1 [unreleased] =============== A command-line interface to the Mac OS X process manager. Written by Nicholas Riley . Obtain updates from . WHAT IS IT? ----------- If you use shell scripts to automate Mac OS X applications, you may need to switch between applications. You could use AppleScript via osascript(1), but that would take several seconds for the script to compile and execute - or you could use appswitch, which works almost instantly. Say you're launching an X11 application from Terminal but the X server isn't in front when you need it. Use appswitch to fix the problem. Or, if you'd like a version of the ps(1) utility which understands the concept of OS X applications, appswitch can help. INSTALLATION ------------ The commands below install the 'appswitch' tool in /usr/local/bin, which is in the default path. You should subsequently be able to use 'appswitch' by typing its name. If you wish to install it somewhere else, modify the install line as appropriate. % sudo /usr/bin/install -d /usr/local/bin /usr/local/man/man1 % sudo /usr/bin/install -c build/appswitch /usr/local/bin % sudo /usr/bin/install -c appswitch.1 /usr/local/man/man1 % rehash # if necessary Uninstallation: % sudo rm -f /usr/local/bin/appswitch /usr/local/man/man1/appswitch.1 COMPILATION ----------- An Xcode project, 'appswitch.xcodeproj', is included. A precompiled Universal binary is also provided. 'appswitch' was developed and tested under Mac OS 10.4.8 with Xcode 2.4, and does not require any additional software to build. USAGE ----- Just type 'appswitch' by itself to receive usage information. See the manual page (man appswitch) for more information. If you're curious about the speed difference between appswitch and other methods, this should give you some indication. appswitch -a Emacs 0.01s user 0.01s system 28% cpu 0.069 total launch -a Emacs 0.01s user 0.01s system 35% cpu 0.076 total open -a Emacs 0.04s user 0.02s system 52% cpu 0.115 total osascript -e 'tell application "Emacs" to activate' 0.13s user 0.06s system 59% cpu 0.326 total The above tests were performed on a Mac mini Core Duo 1.66 GHz; slower systems show more dramatic differences. COMMENTS, SUGGESTIONS, BUG REPORTS, ETC. ---------------------------------------- Please send to the author, Nicholas Riley, at . VERSION HISTORY --------------- 1.1 - unreleased - switched to Process Manager instead of CPS (slower but more compatible) - fixed description of -k option: SIGTERM, not SIGINT - added -f option - Universal Binary, compatible with Intel Macs 1.0.1 - 16 May 2004 - fixed crash matching applications with no bundle identifier - fixed process listing PSN column width 1.0 - 19 February 2003 - added description of -q delay bug (no workaround) 1.0b3 - 13 February 2003 - display spaces instead of ? characters when unprintable - properly handle very narrow window width with -l - further revised and clarified man page - added -q, -K, -L options 1.0b2 - 11 February 2003 - display ? characters for unprintable creator code characters (e.g. java) - fixed -P/-p error in man page - revised and clarified man page 1.0b1 - 10 February 2003 - added -S, -S, -h, -H, -k, -P, -l, -F options - fixed reference to bogus -u option - fixed bug where unknown match type was silently discarded - added man page and this README 1.0d1 - 4 February 2003 - initial release