<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
	>
<channel>
	<title>Comments on: Down with Applescript, up with Javascript!</title>
	<atom:link href="http://highearthorbit.com/down-with-applescript-up-with-javascript-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://highearthorbit.com/down-with-applescript-up-with-javascript-2/</link>
	<description>Transmitting ideas, observations, and images from 42,000 km.</description>
	<lastBuildDate>Tue, 07 Feb 2012 14:15:16 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Peter da Silva</title>
		<link>http://highearthorbit.com/down-with-applescript-up-with-javascript-2/comment-page-1/#comment-7463</link>
		<dc:creator>Peter da Silva</dc:creator>
		<pubDate>Thu, 19 Jan 2006 14:58:58 +0000</pubDate>
		<guid isPermaLink="false">http://highearthorbit.com/down-with-applescript-up-with-javascript-2/#comment-7463</guid>
		<description>I would think the logical thing for Apple to do would be to provide a mapping between Javascript and the applications Applescript dictionary, rather than having applications adapt to a new API.

For example:

var obj = widget.system(&quot;/usr/bin/osascript -e &#039;tell application &quot;iTunes&quot;&#039; -e &#039;name of current track&#039; -e &#039;end tell&#039;&quot;);

var iTunes=osascript.open(&quot;iTunes&quot;);
var track=iTunes.get(&quot;name of current track&quot;); // or whatever the short form of that value is in the dictionary.

JavaScriptOSA seems a little low level, how would I convert an existing Applescript to JavaScriptOSA? For example:

tell application &quot;iTunes&quot;
       if selection is not {} then
               set sel to selection
               repeat with this_track in sel
                       try
                               set shufflable of this_track to 1
                       end try
               end repeat
              display dialog &quot;Done!&quot; buttons {&quot;Thanks&quot;} default button 1 with icon 1 giving up after 15
       else
               display dialog &quot;Select some tracks first...&quot; buttons {&quot;Cancel&quot;} default button 1 with icon 2 giving up after 15
       end if
end tell
</description>
		<content:encoded><![CDATA[<p>I would think the logical thing for Apple to do would be to provide a mapping between Javascript and the applications Applescript dictionary, rather than having applications adapt to a new API.</p>
<p>For example:</p>
<p>var obj = widget.system(&#8221;/usr/bin/osascript -e &#8216;tell application &#8220;iTunes&#8221;&#8216; -e &#8216;name of current track&#8217; -e &#8216;end tell&#8217;&#8221;);</p>
<p>var iTunes=osascript.open(&#8221;iTunes&#8221;);<br />
var track=iTunes.get(&#8221;name of current track&#8221;); // or whatever the short form of that value is in the dictionary.</p>
<p>JavaScriptOSA seems a little low level, how would I convert an existing Applescript to JavaScriptOSA? For example:</p>
<p>tell application &#8220;iTunes&#8221;<br />
       if selection is not {} then<br />
               set sel to selection<br />
               repeat with this_track in sel<br />
                       try<br />
                               set shufflable of this_track to 1<br />
                       end try<br />
               end repeat<br />
              display dialog &#8220;Done!&#8221; buttons {&#8221;Thanks&#8221;} default button 1 with icon 1 giving up after 15<br />
       else<br />
               display dialog &#8220;Select some tracks first&#8230;&#8221; buttons {&#8221;Cancel&#8221;} default button 1 with icon 2 giving up after 15<br />
       end if<br />
end tell</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry</title>
		<link>http://highearthorbit.com/down-with-applescript-up-with-javascript-2/comment-page-1/#comment-7353</link>
		<dc:creator>Barry</dc:creator>
		<pubDate>Wed, 26 Oct 2005 19:14:16 +0000</pubDate>
		<guid isPermaLink="false">http://highearthorbit.com/down-with-applescript-up-with-javascript-2/#comment-7353</guid>
		<description>Apple&#039;s scripting underpinning is really the core Apple Events mechanism, where scriptable applications receive events from outside processes (like scripts) and respond.  The nice bit is that Apple has defined what they call the Open Scripting Architecture (OSA) which allows other scripting languages to be used in place of AppleScript.

Take a look at http://www.latenightsw.com/freeware/JavaScriptOSA for a free implementation of JavaScript for OSA.  This lets you use JavaScript in place of AppleScript, even in Apple&#039;s Script Editor.  Just be sure to set the default language to &quot;JavaScript&quot; in Script Editor&#039;s preferences window.</description>
		<content:encoded><![CDATA[<p>Apple&#8217;s scripting underpinning is really the core Apple Events mechanism, where scriptable applications receive events from outside processes (like scripts) and respond.  The nice bit is that Apple has defined what they call the Open Scripting Architecture (OSA) which allows other scripting languages to be used in place of AppleScript.</p>
<p>Take a look at <a href="http://www.latenightsw.com/freeware/JavaScriptOSA" rel="nofollow">http://www.latenightsw.com/freeware/JavaScriptOSA</a> for a free implementation of JavaScript for OSA.  This lets you use JavaScript in place of AppleScript, even in Apple&#8217;s Script Editor.  Just be sure to set the default language to &#8220;JavaScript&#8221; in Script Editor&#8217;s preferences window.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://highearthorbit.com/down-with-applescript-up-with-javascript-2/comment-page-1/#comment-6229</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Fri, 30 Sep 2005 12:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://highearthorbit.com/down-with-applescript-up-with-javascript-2/#comment-6229</guid>
		<description>I have spent 5 years developing a &quot;portable OS&quot; for the Internet which provides significant advantages for websites and portable applications (rich internet apps). Much of the technology base is built with javascript, and moreover, it provides programmers and students alike to develop webpages and scripts - online, which means they are accessible from any modern computer. 

Using this platform and its &quot;focused solution&quot; data is already portable using a Graphical User Interface (GUI). A good example of this, one that brings windows into your browser, is found at http://goGUI.com.

The next step is to make &quot;portable Applications&quot; a reality. Imagine a license for a porfessiona office suite that doesn&#039;t have to be installed on a single computer, and can be used from any modern computer - quickly, efficiently and interactively.

If you register at GoGUI, you may create and edit online webpages and scripts (javascript). These scripts, like all files within your portable desktop, and its PI explorer (just like windows explorer only portable) can be moved and managed as easily online, as they are in a static operating system such as MS Windsows.</description>
		<content:encoded><![CDATA[<p>I have spent 5 years developing a &#8220;portable OS&#8221; for the Internet which provides significant advantages for websites and portable applications (rich internet apps). Much of the technology base is built with javascript, and moreover, it provides programmers and students alike to develop webpages and scripts &#8211; online, which means they are accessible from any modern computer. </p>
<p>Using this platform and its &#8220;focused solution&#8221; data is already portable using a Graphical User Interface (GUI). A good example of this, one that brings windows into your browser, is found at <a href="http://goGUI.com" rel="nofollow">http://goGUI.com</a>.</p>
<p>The next step is to make &#8220;portable Applications&#8221; a reality. Imagine a license for a porfessiona office suite that doesn&#8217;t have to be installed on a single computer, and can be used from any modern computer &#8211; quickly, efficiently and interactively.</p>
<p>If you register at GoGUI, you may create and edit online webpages and scripts (javascript). These scripts, like all files within your portable desktop, and its PI explorer (just like windows explorer only portable) can be moved and managed as easily online, as they are in a static operating system such as MS Windsows.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

