[LA.pm] app_running status to perl
davidmailinglist at cloudgraphics.com
Tue Oct 31 19:49:29 PST 2006
I'm currently trying to check if firefox is running before I edit
pref files with perl (mac 10).
$results = system "osascript -e 'tell app \"System Events\" to count
processes whose name is \"firefox-bin\"'>output";
Either way I run the above with firefox running or not running
-though the terminal, my results are "0".
I snarfed a small piece of code (for my project) from::
The same page offers another way to figure out the status of a
running app. Said author promotes detecting mac creator codes?!?! I
would have sworn mac x killed off that metadata, and I couldn't find
any online notes on how to figure firefox's creator code. I tried to
check with "FileInfo"(shareware). Firefox apparently has ???? creator
code. Either non-existant, or beyond display range?
The last method on the web page is 10.4 specific, and I'm looking to
build portable code (that won't break easily).
David Heayn * http://www.cloudgraphics.com * (213)925.3283
More information about the Losangeles-pm