<?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/"
		>
<channel>
	<title>Comments on: Minimal Scriptability</title>
	<atom:link href="http://www.red-sweater.com/blog/150/minimal-scriptability/feed" rel="self" type="application/rss+xml" />
	<link>http://www.red-sweater.com/blog/150/minimal-scriptability</link>
	<description>Mac &#38; Technology Writings by Daniel Jalkut</description>
	<lastBuildDate>Wed, 18 Jan 2012 18:10:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-249428</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Thu, 29 Sep 2011 00:42:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-249428</guid>
		<description>Hi Joel - it still works in Lion, though there are some complications.

First, bear in mind that the Info.plist never had the NSAppleScriptEnabled parameter to begin with. You have to add it manually and set the value to true.

Second, since Apple now makes copious use of code signing, modifying the Info.plist will &quot;break&quot; the Preview app and cause it to stop launching entirely.

So if you wanted to do this trick, a safer way to do it would be:

1. Make a copy of Preview.app and call it &quot;HackPreview.app&quot;
2. Open the HackPreview Info.plist, and add the requisite NSAppleScriptEnabled flag
3. Open Terminal and re-sign the hacked copy: 
&lt;pre&gt;
codesign -f -s - /Applications/HackPreview.app
&lt;/pre&gt;
4. Launch HackPreview and now try writing a script asking for documents of application &quot;HackPreview&quot;.

The point of this post was mostly to show what kind of sneaky stuff you can do if you go poking around in Plists. It doesn&#039;t really have a lot of value for real scripting tasks. Probably Automator is a better solution for whatever PDF or images automation you might want to do.</description>
		<content:encoded><![CDATA[<p>Hi Joel &#8211; it still works in Lion, though there are some complications.</p>
<p>First, bear in mind that the Info.plist never had the NSAppleScriptEnabled parameter to begin with. You have to add it manually and set the value to true.</p>
<p>Second, since Apple now makes copious use of code signing, modifying the Info.plist will &#8220;break&#8221; the Preview app and cause it to stop launching entirely.</p>
<p>So if you wanted to do this trick, a safer way to do it would be:</p>
<p>1. Make a copy of Preview.app and call it &#8220;HackPreview.app&#8221;<br />
2. Open the HackPreview Info.plist, and add the requisite NSAppleScriptEnabled flag<br />
3. Open Terminal and re-sign the hacked copy: </p>
<pre>
codesign -f -s - /Applications/HackPreview.app
</pre>
<p>4. Launch HackPreview and now try writing a script asking for documents of application &#8220;HackPreview&#8221;.</p>
<p>The point of this post was mostly to show what kind of sneaky stuff you can do if you go poking around in Plists. It doesn&#8217;t really have a lot of value for real scripting tasks. Probably Automator is a better solution for whatever PDF or images automation you might want to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-249358</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Wed, 28 Sep 2011 22:13:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-249358</guid>
		<description>I hate to dig up an ancient post, but this is the best instructable I could find on this issue. However, it seems not to work for Lion (info.plist doesn&#039;t have these parameters). Is there an alternative for those of us using this &quot;improved&quot; operating system?</description>
		<content:encoded><![CDATA[<p>I hate to dig up an ancient post, but this is the best instructable I could find on this issue. However, it seems not to work for Lion (info.plist doesn&#8217;t have these parameters). Is there an alternative for those of us using this &#8220;improved&#8221; operating system?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: christian boyce</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-56809</link>
		<dc:creator>christian boyce</dc:creator>
		<pubDate>Fri, 16 Feb 2007 08:24:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-56809</guid>
		<description>Fred, use Image Events to convert the folder of PSD files to JPGs. Here&#039;s a link for you. 

http://www.apple.com/applescript/imageevents/</description>
		<content:encoded><![CDATA[<p>Fred, use Image Events to convert the folder of PSD files to JPGs. Here&#8217;s a link for you. </p>
<p><a href="http://www.apple.com/applescript/imageevents/" rel="nofollow">http://www.apple.com/applescript/imageevents/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-50747</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Fri, 02 Feb 2007 15:01:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-50747</guid>
		<description>Mike: I think Preview is still so relatively unscriptable this might be hard. But in your position I would look at Automator and some of the &quot;PDF&quot; actions. For instance, &quot;Watermark PDF&quot; will allow you to add just about anything (text, a picture, etc) over all the pages of a PDF.</description>
		<content:encoded><![CDATA[<p>Mike: I think Preview is still so relatively unscriptable this might be hard. But in your position I would look at Automator and some of the &#8220;PDF&#8221; actions. For instance, &#8220;Watermark PDF&#8221; will allow you to add just about anything (text, a picture, etc) over all the pages of a PDF.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike B</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-50525</link>
		<dc:creator>Mike B</dc:creator>
		<pubDate>Fri, 02 Feb 2007 05:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-50525</guid>
		<description>Just curious to know if anyone has written a simple Preview script that will place a piece of text on each page of the document opened? Even adding text to the first page would be a plus. I work in a lab where lots of people use the same printer and it would help sort things out a bit.</description>
		<content:encoded><![CDATA[<p>Just curious to know if anyone has written a simple Preview script that will place a piece of text on each page of the document opened? Even adding text to the first page would be a plus. I work in a lab where lots of people use the same printer and it would help sort things out a bit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-46940</link>
		<dc:creator>Fred</dc:creator>
		<pubDate>Wed, 24 Jan 2007 08:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-46940</guid>
		<description>Is it possible to make a script to automatically convert a whole folder full of PSD files to JPGs?

I have enabled AppleScript on Preview, but the limited scripting may not be enough.

What about and Automator Action?

Any ideas?

GraphicConverter is way to buggy. It left many files corrupted after a loit of work. I ended up deleting them all because I couldn&#039;t trust the output.
Preview can read and convert everything with no problem.
It&#039;s just tedious to have to do it file by file.</description>
		<content:encoded><![CDATA[<p>Is it possible to make a script to automatically convert a whole folder full of PSD files to JPGs?</p>
<p>I have enabled AppleScript on Preview, but the limited scripting may not be enough.</p>
<p>What about and Automator Action?</p>
<p>Any ideas?</p>
<p>GraphicConverter is way to buggy. It left many files corrupted after a loit of work. I ended up deleting them all because I couldn&#8217;t trust the output.<br />
Preview can read and convert everything with no problem.<br />
It&#8217;s just tedious to have to do it file by file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nehemiah</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-43139</link>
		<dc:creator>Nehemiah</dc:creator>
		<pubDate>Thu, 11 Jan 2007 20:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-43139</guid>
		<description>Thank you for your help, I certianly wiill do that from now on. 
俺輪馬鹿です
Ore wa baka desu</description>
		<content:encoded><![CDATA[<p>Thank you for your help, I certianly wiill do that from now on.<br />
俺輪馬鹿です<br />
Ore wa baka desu</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Jalkut</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-42833</link>
		<dc:creator>Daniel Jalkut</dc:creator>
		<pubDate>Wed, 10 Jan 2007 21:20:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-42833</guid>
		<description>Nehemiah: yes, in particular one of the items in the Info.plist, 
&quot;CFBundleExecutable&quot;, tells the operating system where to find the code that actually runs the app. In Preview.app it should be called &quot;Preview&quot;. Is that still there?

I&#039;m sure it goes without saying that you should always make a backup of such files in the future, before editing them. But yeah, if you need to replace it, you&#039;ll just want to get a fresh copy of Preview.app, either from another computer or by reinstalling.</description>
		<content:encoded><![CDATA[<p>Nehemiah: yes, in particular one of the items in the Info.plist,<br />
&#8220;CFBundleExecutable&#8221;, tells the operating system where to find the code that actually runs the app. In Preview.app it should be called &#8220;Preview&#8221;. Is that still there?</p>
<p>I&#8217;m sure it goes without saying that you should always make a backup of such files in the future, before editing them. But yeah, if you need to replace it, you&#8217;ll just want to get a fresh copy of Preview.app, either from another computer or by reinstalling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nehemiah</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-42829</link>
		<dc:creator>Nehemiah</dc:creator>
		<pubDate>Wed, 10 Jan 2007 21:12:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-42829</guid>
		<description>When i tried this a few times, it didn&#039;t work. Now Preview doesn&#039;t launch. if I edit something unintentionally in the Info.plist file, could that stop the app from launching. if it does, how might i come by a replacement original for Preview.app? (aside from reinstalling from the install disk? i am prepared to do that)</description>
		<content:encoded><![CDATA[<p>When i tried this a few times, it didn&#8217;t work. Now Preview doesn&#8217;t launch. if I edit something unintentionally in the Info.plist file, could that stop the app from launching. if it does, how might i come by a replacement original for Preview.app? (aside from reinstalling from the install disk? i am prepared to do that)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Adams</title>
		<link>http://www.red-sweater.com/blog/150/minimal-scriptability/comment-page-1#comment-17128</link>
		<dc:creator>Doug Adams</dc:creator>
		<pubDate>Tue, 03 Oct 2006 00:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.red-sweater.com/blog/150/minimal-scriptability#comment-17128</guid>
		<description>Sal says it&#039;s OK, and that&#039;s good enough for me.</description>
		<content:encoded><![CDATA[<p>Sal says it&#8217;s OK, and that&#8217;s good enough for me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

