[TxMt] prefixing TM_PROJECT DIRECTORY in applescript

Kevin Ballard kevin at sb.org
Mon Dec 11 16:15:33 UTC 2006


Oh sorry. replace the -- with a single -.

On Dec 11, 2006, at 1:27 AM, xolela at mac.com wrote:

> Thanks Kevin,
>
> However, sorry to bother you again.
>
> I thought  that the reference to  "$TM_PROJECT_DIRECTORY" after   
> end run' -- is what  substituted for the  (argv) in the run  
> command.  I  am not getting any file to be opened.  It appears that  
> the line that does the concatenating is not working for some reason.
>
> Thanks again.
>
> danstan
>
>
> On Dec 10, 2006, at 5:45 PM, Kevin Ballard wrote:
>
>> query=${TM_SELECTED_TEXT:-$TM_CURRENT_LINE}
>> echo "$query" > textmatetostata.do
>>
>> osascript -e 'on run(argv)
>> tell application "Stata"
>> activate
>> open POSIX file ((item 1 of argv as string) & "/textmatetostata.do")
>> end tell
>> end run' -- "$TM_PROJECT_DIRECTORY"

-- 
Kevin Ballard
http://kevin.sb.org
kevin at sb.org
http://www.tildesoft.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061211/ba9c445a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2432 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20061211/ba9c445a/attachment.p7s>


More information about the textmate mailing list