<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi, first post to this forum, after switching from BBEdit to TextMate.<div>while I'm discovering everyday the benefit of this change, I came across a syntax problem with a Applescript I was using successfully with BBEdit.</div><div><br class="webkit-block-placeholder"></div><div>the principle of the script was to create folders and sub-folders, then create a new document in one of them with my text editor, save it with a title, bringing it to the front for entry.</div><div>changing the app to TextMate, I get an error: </div><div>[quote] AppleEvent Handler failed: expect end of line but get "to" [/quote]</div><div><br class="webkit-block-placeholder"></div><div>I have posted an entry on MacScripter, to hear that TextMate was "poorly scriptable, even Standard Suite is badly implemented".</div><div>any solution to contradict that?!</div><div>below the script in question:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" face="Helvetica"><blockquote type="cite" class=""><span class="Apple-style-span" style="color: rgb(0, 0, 0); "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><span><font class="Apple-style-span" color="#000000" face="Helvetica">set</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">theFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">choose folder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">with prompt</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">"Create/Choose Client Project folder"</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000" face="Helvetica">try</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 83.2px; text-indent: -83.2px; font: normal normal normal 12px/normal Verdana; "><span style="font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" color="#000000"> </font></span></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">set</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">briefFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">((</font><span><font class="Apple-style-span" color="#000000" face="Helvetica">theFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">as</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">text</font></span><font class="Apple-style-span" color="#000000" face="Helvetica">)</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">&</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">"Brief")</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">as</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">alias</font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000" face="Helvetica">on</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">error</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 83.2px; text-indent: -83.2px; font: normal normal normal 12px/normal Verdana; "><span style="font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" color="#000000"> </font></span></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">application</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">"Finder"</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">set</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">briefFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">make</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">new</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">folder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">at</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">theFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">with properties</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">{</font><span><font class="Apple-style-span" color="#000000" face="Helvetica">name</font></span><font class="Apple-style-span" color="#000000" face="Helvetica">:"Brief"}</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000" face="Helvetica">end</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">try</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">application</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">"Finder"</font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 83.2px; text-indent: -83.2px; font: normal normal normal 12px/normal Verdana; "><span style="font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" color="#000000"> </font></span></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">set</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">capturesFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">make</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">new</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">folder</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">at</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">theFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">with properties</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">{</font></span><font class="Apple-style-span" color="#000000" face="Helvetica">name</font><span><font class="Apple-style-span" color="#000000" face="Helvetica">:"Captures"}</font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000" face="Helvetica">end</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">application</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">"TextMate" -- was BBEdit</font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 83.2px; text-indent: -83.2px; font: normal normal normal 12px/normal Verdana; "><span style="font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" color="#000000"> </font></span></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">set</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">briefDoc</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">make</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">new</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">document</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">at</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">beginning</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">with properties</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">{</font></span><font class="Apple-style-span" color="#000000" face="Helvetica">name</font><span><font class="Apple-style-span" color="#000000" face="Helvetica">:"$.tasks"} -- was "$.todo"</font></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 83.2px; text-indent: -83.2px; font: normal normal normal 12px/normal Verdana; "><span style="font: normal normal normal 12px/normal Helvetica; "><span class="Apple-tab-span" style="white-space: pre; "><font class="Apple-style-span" color="#000000"> </font></span></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">save</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">briefDoc</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">((</font><span><font class="Apple-style-span" color="#000000" face="Helvetica">briefFolder</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">as</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">text</font></span><font class="Apple-style-span" color="#000000" face="Helvetica">)</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">&</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">"$.tasks")</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; "><font class="Apple-style-span" color="#000000" face="Helvetica">end</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 41.6px; text-indent: -41.7px; font: normal normal normal 12px/normal Verdana; color: rgb(0, 0, 255); "><span><font class="Apple-style-span" color="#000000" face="Helvetica">tell</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">application</font><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">"TextMate"</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><span><font class="Apple-style-span" color="#000000" face="Helvetica">to</font></span><span style="font: normal normal normal 12px/normal Helvetica; "><font class="Apple-style-span" color="#000000"> </font></span><font class="Apple-style-span" color="#000000" face="Helvetica">activate -- was BBEd<font class="Apple-style-span" color="#000000">i</font></font><font class="Apple-style-span" color="#000000" face="Helvetica">t</font></div></span></blockquote></font></div></div><div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div><div>cheers, Pascal</div></div><div><br class="webkit-block-placeholder"></div></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>