<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: appscript: Is application running?</title>
	<atom:link href="http://schinckel.net/2007/07/22/appscript-is-application-running/feed/" rel="self" type="application/rss+xml" />
	<link>http://schinckel.net/2007/07/22/appscript-is-application-running/</link>
	<description>Like a fortune cookie, only without the fortune, and not a cookie.</description>
	<pubDate>Wed, 07 Jan 2009 18:21:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Matt</title>
		<link>http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1754</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Tue, 24 Jul 2007 09:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1754</guid>
		<description>Thanks.  That probably is nicer than mine.

I've only just started playing with appscript properly.  It is übercool, but I clearly don't grok everything it can do just yet!</description>
		<content:encoded><![CDATA[<p>Thanks.  That probably is nicer than mine.</p>
<p>I&#8217;ve only just started playing with appscript properly.  It is übercool, but I clearly don&#8217;t grok everything it can do just yet!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: has</title>
		<link>http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1743</link>
		<dc:creator>has</dc:creator>
		<pubDate>Mon, 23 Jul 2007 16:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1743</guid>
		<description>System Events' 'exists' command can be used to text for the existence of a specified element or elements:

&lt;code&gt;isrunning = app('System Events').processes['AppName'].exists()&lt;/code&gt;

Note that with the above approach (which uses the by-name reference form), process names are case-sensitive for some reason. If you want case-insensitivity, using the by-test reference form seems to work:

&lt;code&gt;isrunning = app('System Events').processes[its.name == 'AppName'].exists()&lt;/code&gt;

Alternatively, you can use the aem module to check for a running process based on the application's path:

&lt;code&gt;from aem import Application
isrunning = Application.isrunning('/path/to/some.app')&lt;/code&gt;

aem also includes a findapp module that you can use to locate an application by name, creator type or bundle id. The appscript documentation has more info on this.</description>
		<content:encoded><![CDATA[<p>System Events&#8217; &#8216;exists&#8217; command can be used to text for the existence of a specified element or elements:</p>
<p><code>isrunning = app('System Events').processes['AppName'].exists()</code></p>
<p>Note that with the above approach (which uses the by-name reference form), process names are case-sensitive for some reason. If you want case-insensitivity, using the by-test reference form seems to work:</p>
<p><code>isrunning = app('System Events').processes[its.name == 'AppName'].exists()</code></p>
<p>Alternatively, you can use the aem module to check for a running process based on the application&#8217;s path:</p>
<p><code>from aem import Application<br />
isrunning = Application.isrunning('/path/to/some.app')</code></p>
<p>aem also includes a findapp module that you can use to locate an application by name, creator type or bundle id. The appscript documentation has more info on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajeev karamchedu</title>
		<link>http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1735</link>
		<dc:creator>rajeev karamchedu</dc:creator>
		<pubDate>Mon, 23 Jul 2007 11:44:24 +0000</pubDate>
		<guid isPermaLink="false">http://schinckel.net/2007/07/22/appscript-is-application-running/#comment-1735</guid>
		<description>I believe in Leopard, there is dtrace as well.. I have been keeping some notes on leopard &lt;a href="http://rajeev.name/blog/category/apple/" rel="nofollow"&gt;here&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I believe in Leopard, there is dtrace as well.. I have been keeping some notes on leopard <a href="http://rajeev.name/blog/category/apple/" rel="nofollow">here</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
