<?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: Scripting Bridge</title>
	<atom:link href="http://robnapier.net/blog/scripting-bridge-265/feed" rel="self" type="application/rss+xml" />
	<link>http://robnapier.net/blog/scripting-bridge-265</link>
	<description>Mac and iPhone, on the brain</description>
	<lastBuildDate>Tue, 23 Feb 2010 17:44:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rob Napier</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-259</link>
		<dc:creator>Rob Napier</dc:creator>
		<pubDate>Thu, 24 Sep 2009 16:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-259</guid>
		<description>&lt;p&gt;I&#039;ve seen no easy way to create an HTML mail through Applescript. You can write the HTML to a file and read it in, but that&#039;s a lot of work. And I&#039;ve seen folks who pass keyboard events, but that&#039;s very fragile.&lt;/p&gt;

&lt;p&gt;There is a private property called &quot;htmlContent,&quot; but I&#039;ve never been able to read or write it. There&#039;s also a &quot;source&quot; property, but it&#039;s readonly. The mail headers are not modifiable on outgoing messages.&lt;/p&gt;

&lt;p&gt;I don&#039;t know if anyone has solved this problem in a good way.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen no easy way to create an HTML mail through Applescript. You can write the HTML to a file and read it in, but that&#8217;s a lot of work. And I&#8217;ve seen folks who pass keyboard events, but that&#8217;s very fragile.</p>

<p>There is a private property called &#8220;htmlContent,&#8221; but I&#8217;ve never been able to read or write it. There&#8217;s also a &#8220;source&#8221; property, but it&#8217;s readonly. The mail headers are not modifiable on outgoing messages.</p>

<p>I don&#8217;t know if anyone has solved this problem in a good way.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Dalton Hamilton</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-258</link>
		<dc:creator>Dalton Hamilton</dc:creator>
		<pubDate>Thu, 24 Sep 2009 15:22:37 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-258</guid>
		<description>&lt;p&gt;Hi.  Excellent article.  I&#039;ve written a ScriptingBridge Cocoa app in Xcode and it works fine for text emails and attachments.  However, I want the attachment to show in the body of the email on Outlook email clients.  To do this, I need to convert the email to HTML by adding a header of &quot;Content-Type: text/html&quot;.   Do you know how to do this or know where I can find other classForScriptingClass objects -- specifically for headers?
Best Regard
Dalton Hamilton
Chapel Hill, NC&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi.  Excellent article.  I&#8217;ve written a ScriptingBridge Cocoa app in Xcode and it works fine for text emails and attachments.  However, I want the attachment to show in the body of the email on Outlook email clients.  To do this, I need to convert the email to HTML by adding a header of &#8220;Content-Type: text/html&#8221;.   Do you know how to do this or know where I can find other classForScriptingClass objects &#8212; specifically for headers?
Best Regard
Dalton Hamilton
Chapel Hill, NC</p>]]></content:encoded>
	</item>
	<item>
		<title>By: John Gallagher</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-40</link>
		<dc:creator>John Gallagher</dc:creator>
		<pubDate>Wed, 24 Jun 2009 13:23:29 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-40</guid>
		<description>&lt;p&gt;Thanks for this Rob. I tried to get Scripting Bridge working a few months ago and eventually gave up. I mention this because I was trying to convert an Applescript that ran perfectly, but I couldn&#039;t get certain properties with Scripting Bridge.&lt;/p&gt;

&lt;p&gt;It&#039;s a long, long time ago and I can&#039;t remember the specifics except that I was working with System Events, but it&#039;s worth noting that in some edge cases, Scripting Bridge won&#039;t allow you to access some areas that AppleScript does.&lt;/p&gt;

&lt;p&gt;So I eventually resigned myself to using a third party tool called AppScript - http://appscript.sourceforge.net/&lt;/p&gt;

&lt;p&gt;Hope this is helpful to someone else for who Scripting Bridge isn&#039;t suitable.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for this Rob. I tried to get Scripting Bridge working a few months ago and eventually gave up. I mention this because I was trying to convert an Applescript that ran perfectly, but I couldn&#8217;t get certain properties with Scripting Bridge.</p>

<p>It&#8217;s a long, long time ago and I can&#8217;t remember the specifics except that I was working with System Events, but it&#8217;s worth noting that in some edge cases, Scripting Bridge won&#8217;t allow you to access some areas that AppleScript does.</p>

<p>So I eventually resigned myself to using a third party tool called AppScript &#8211; <a href="http://appscript.sourceforge.net/" rel="nofollow">http://appscript.sourceforge.net/</a></p>

<p>Hope this is helpful to someone else for who Scripting Bridge isn&#8217;t suitable.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Napier</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-31</link>
		<dc:creator>Rob Napier</dc:creator>
		<pubDate>Sat, 13 Jun 2009 20:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-31</guid>
		<description>&lt;p&gt;Scripting Bridge does not exist on iPhone. The Mail.app you are importing here is a completely different application from the iPhone application, so wouldn&#039;t be helpful even if Scripting Bridge were available. You may be able to eventually get it compiling on Simulator because Simulator uses the Mac&#039;s version of Foundation, but it can&#039;t work on iPhone because iPhone doesn&#039;t provide an Applescript interface to other applications.&lt;/p&gt;

&lt;p&gt;The only interface 3rd party apps have to the Mail app on iPhone in 2.2 is the mailto: URL, which is limited, but all we really have.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Scripting Bridge does not exist on iPhone. The Mail.app you are importing here is a completely different application from the iPhone application, so wouldn&#8217;t be helpful even if Scripting Bridge were available. You may be able to eventually get it compiling on Simulator because Simulator uses the Mac&#8217;s version of Foundation, but it can&#8217;t work on iPhone because iPhone doesn&#8217;t provide an Applescript interface to other applications.</p>

<p>The only interface 3rd party apps have to the Mail app on iPhone in 2.2 is the mailto: URL, which is limited, but all we really have.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: mark e. barron</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-29</link>
		<dc:creator>mark e. barron</dc:creator>
		<pubDate>Sat, 13 Jun 2009 17:05:55 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-29</guid>
		<description>&lt;p&gt;I actually included the files named below
ScriptingBridge/SBApplication.h
main.h&lt;/p&gt;

&lt;p&gt;The pointy brackets were throwing the script.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I actually included the files named below
ScriptingBridge/SBApplication.h
main.h</p>

<p>The pointy brackets were throwing the script.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: mark e. barron</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-28</link>
		<dc:creator>mark e. barron</dc:creator>
		<pubDate>Sat, 13 Jun 2009 17:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-28</guid>
		<description>&lt;p&gt;typo above: I actually correctly added two imports&lt;/p&gt;

&lt;h1&gt;import&lt;/h1&gt;

&lt;h1&gt;import &quot;Mail.h&quot;&lt;/h1&gt;
</description>
		<content:encoded><![CDATA[<p>typo above: I actually correctly added two imports</p>

<h1>import</h1>

<h1>import &#8220;Mail.h&#8221;</h1>]]></content:encoded>
	</item>
	<item>
		<title>By: mark e. barron</title>
		<link>http://robnapier.net/blog/scripting-bridge-265/comment-page-1#comment-27</link>
		<dc:creator>mark e. barron</dc:creator>
		<pubDate>Sat, 13 Jun 2009 17:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://robnapier.net/blog/?p=265#comment-27</guid>
		<description>&lt;p&gt;I need to find someone out there who is interested in the same and who
has the understanding to redirect me toward a solution. Am I trying to do 
the impossible? I believe AppKit.h is not normal for iPhone. I get errors
relating to it as you will see below.&lt;/p&gt;

&lt;p&gt;Following instructions, 
1. I added ScriptingBridge.framework to the General Tab of the Target Info Page&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I selected the Rules Tab of the Target Info Page and added the custom script
sdef &quot;$INPUT_FILE_PATH&quot; &#124; sdp -fh -o &quot;$DERIVED_FILES_DIR&quot; --basename
&quot;$INPUT_FILE_BASE&quot; --bundleid &lt;code&gt;defaults read &quot;$INPUT_FILE_PATH/Contents/Info&quot;
CFBundleIdentifier&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;followed by :  the info for &#039;with output files&#039;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I created a Group(folder) in my Project ,name AssociatedApp and dragged Mail.app there
after unselecting the &quot;Copy Items into destination group&#039;s folder&quot;&lt;/p&gt;

&lt;p&gt;Next we are instructed to :&lt;/p&gt;

&lt;h1&gt;Drag the application into your “Compile Sources” step in your&lt;/h1&gt;

&lt;p&gt;Target (it should be first, so the .h gets created before it’s needed).
Yes, we are “compiling” an application into a header.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Include the new header file in your program.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt; end of instructions;&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When I drag Mail.app to the Rules Tab of the Target Info Page 
I see only one place that I get a cut and paste &#039;green Plus sign paste accepted&quot; icon.
This is in the box with the text beginning with &quot;sdef &quot;$Input_FILE&quot;,
inserting a blank first, I get&lt;/p&gt;

&lt;p&gt;sdef &quot;$INPUT_FILE_PATH&quot; &#124; sdp -fh -o &quot;$DERIVED_FILES_DIR&quot; --basename
&quot;$INPUT_FILE_BASE&quot; --bundleid &lt;code&gt;defaults read &quot;$INPUT_FILE_PATH/Contents/Info&quot;
CFBundleIdentifier&lt;/code&gt; /Users/appleuser/Cocoa/iHungry7/Mail.app&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I have an source file from which I will attempt to email with an attachment.
at the top of this *.m file I paste, as directed:
  #import 
  #import &quot;Mail.h&quot;&lt;/p&gt;

&lt;p&gt;I find the newly created Mail.h file as predicted in DerivedSources below the build folder.
  I copy it to my project and include it in the project, using &#039;add existing file&#039;.&lt;/p&gt;

&lt;p&gt;I then Build as directed   and get multiple errors. I am stuck  . Many Many thanks for reading.
Mark&lt;/p&gt;

&lt;p&gt;cd /Users/appleuser/Cocoa/iHungry7
    setenv PATH &quot;/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin&quot;
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/iHungry.hmap -F/Users/appleuser/Cocoa/iHungry7/build/Debug-iphonesimulator -I/Users/appleuser/Cocoa/iHungry7/build/Debug-iphonesimulator/include -I/Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/DerivedSources -include /var/folders/lJ/lJDuzOmaEX4Q1OyHZP8pTE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/iHungry_Prefix-besecngakovcoubtihetjjsibyjz/iHungry_Prefix.pch -c /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m -o /Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/Objects-normal/i386/RecipeNoteViewController.o
/Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:16:42: error: ScriptingBridge/SBApplication.h: No such file or directory
In file included from /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:17:
/Users/appleuser/Cocoa/iHungry7/Mail.h:5:26: error: AppKit/AppKit.h: No such file or directory
/Users/appleuser/Cocoa/iHungry7/Mail.h:6:44: error: ScriptingBridge/ScriptingBridge.h: No such file or directory
In file included from /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:17:
/Users/appleuser/Cocoa/iHungry7/Mail.h:134: error: cannot find interface declaration for &#039;SBObject&#039;, superclass of &#039;MailItem&#039;
/Users/appleuser/Cocoa/iHungry7/Mail.h:140: error: syntax error before &#039;SBObject&#039;
/Users/appleuser/Cocoa/iHungry7/Mail.h:141: fatal error: method definition not in @implementation context
compilation terminated.
{standard input}:32:FATAL:.abort  detected.  Assembly stopping.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I need to find someone out there who is interested in the same and who
has the understanding to redirect me toward a solution. Am I trying to do 
the impossible? I believe AppKit.h is not normal for iPhone. I get errors
relating to it as you will see below.</p>

<p>Following instructions, 
1. I added ScriptingBridge.framework to the General Tab of the Target Info Page</p>

<ol>
<li>I selected the Rules Tab of the Target Info Page and added the custom script
sdef &#8220;$INPUT_FILE_PATH&#8221; | sdp -fh -o &#8220;$DERIVED_FILES_DIR&#8221; &#8211;basename
&#8220;$INPUT_FILE_BASE&#8221; &#8211;bundleid <code>defaults read "$INPUT_FILE_PATH/Contents/Info"
CFBundleIdentifier</code></li>
</ol>

<p>followed by :  the info for &#8216;with output files&#8217;</p>

<ol>
<li><p>I created a Group(folder) in my Project ,name AssociatedApp and dragged Mail.app there
after unselecting the &#8220;Copy Items into destination group&#8217;s folder&#8221;</p>

<p>Next we are instructed to :</p>

<h1>Drag the application into your “Compile Sources” step in your</h1>

<p>Target (it should be first, so the .h gets created before it’s needed).
Yes, we are “compiling” an application into a header.</p>

<ol>
<li>Include the new header file in your program.</li>
</ol></li>
</ol>

<h2> end of instructions;</h2>

<ol>
<li><p>When I drag Mail.app to the Rules Tab of the Target Info Page 
I see only one place that I get a cut and paste &#8216;green Plus sign paste accepted&#8221; icon.
This is in the box with the text beginning with &#8220;sdef &#8220;$Input_FILE&#8221;,
inserting a blank first, I get</p>

<p>sdef &#8220;$INPUT_FILE_PATH&#8221; | sdp -fh -o &#8220;$DERIVED_FILES_DIR&#8221; &#8211;basename
&#8220;$INPUT_FILE_BASE&#8221; &#8211;bundleid <code>defaults read "$INPUT_FILE_PATH/Contents/Info"
CFBundleIdentifier</code> /Users/appleuser/Cocoa/iHungry7/Mail.app</p></li>
</ol>

<p>I have an source file from which I will attempt to email with an attachment.
at the top of this *.m file I paste, as directed:
  #import 
  #import &#8220;Mail.h&#8221;</p>

<p>I find the newly created Mail.h file as predicted in DerivedSources below the build folder.
  I copy it to my project and include it in the project, using &#8216;add existing file&#8217;.</p>

<p>I then Build as directed   and get multiple errors. I am stuck  . Many Many thanks for reading.
Mark</p>

<p>cd /Users/appleuser/Cocoa/iHungry7
    setenv PATH &#8220;/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin&#8221;
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D__IPHONE_OS_VERSION_MIN_REQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.2.1.sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -I/Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/iHungry.hmap -F/Users/appleuser/Cocoa/iHungry7/build/Debug-iphonesimulator -I/Users/appleuser/Cocoa/iHungry7/build/Debug-iphonesimulator/include -I/Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/DerivedSources -include /var/folders/lJ/lJDuzOmaEX4Q1OyHZP8pTE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/iHungry_Prefix-besecngakovcoubtihetjjsibyjz/iHungry_Prefix.pch -c /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m -o /Users/appleuser/Cocoa/iHungry7/build/iHungry7.build/Debug-iphonesimulator/iHungry.build/Objects-normal/i386/RecipeNoteViewController.o
/Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:16:42: error: ScriptingBridge/SBApplication.h: No such file or directory
In file included from /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:17:
/Users/appleuser/Cocoa/iHungry7/Mail.h:5:26: error: AppKit/AppKit.h: No such file or directory
/Users/appleuser/Cocoa/iHungry7/Mail.h:6:44: error: ScriptingBridge/ScriptingBridge.h: No such file or directory
In file included from /Users/appleuser/Cocoa/iHungry7/RecipeNoteViewController.m:17:
/Users/appleuser/Cocoa/iHungry7/Mail.h:134: error: cannot find interface declaration for &#8216;SBObject&#8217;, superclass of &#8216;MailItem&#8217;
/Users/appleuser/Cocoa/iHungry7/Mail.h:140: error: syntax error before &#8216;SBObject&#8217;
/Users/appleuser/Cocoa/iHungry7/Mail.h:141: fatal error: method definition not in @implementation context
compilation terminated.
{standard input}:32:FATAL:.abort  detected.  Assembly stopping.</p>]]></content:encoded>
	</item>
</channel>
</rss>
