[TxMt] prefixing TM_PROJECT DIRECTORY in applescript
xolela at mac.com
xolela at mac.com
Sun Dec 10 10:05:11 UTC 2006
Within a snippet, I am trying to prefix the $TM_PROJECT_DIRECTORY
to a file name in applescript (but I am not sure how TM environment
variables & files are concatenated into the applescript world?).
In essence, the file textmatetostata.do is created (from
textmate) by default in the $TM_PROJECT_DIRECTORY. The problem is
that when stata activates it cannot find it - since it opens in a
different directory by default.
What I am trying to do is as below: (but this is failing!)
query=${TM_SELECTED_TEXT:-$TM_CURRENT_LINE}
echo "$query" > textmatetostata.do
osascript -e "tell application \"Stata\"
activate
open POSIX file {$TM_PROJECT_DIRECTORY} & \"textmatetostata.do\"
end tell"
- thanks
danstan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20061210/94e5b3fb/attachment.html>
More information about the textmate
mailing list