Hi Bill:
I was hoping for something similar when I wrote to the mailing list a couple of months ago. If $TM_DIRECTORY could be made available to the outside world via applescript, morons like me could make use of this.
If he does let you hack on it, I'd be grateful for this functionality too.
Thanks.
Bill
PS: What I have in mind is something similar to Gary Kerbaugh's Terimal/iTerm -- Finder interaction osa/shell scripts: http:// xanana.ucsc.edu/xtal/terminal_finder_interactions.html
William G. Scott
contact info: http://chemistry.ucsc.edu/~wgscott
Begin forwarded message:
From: William Scott wgscott@chemistry.ucsc.edu Date: August 12, 2006 8:02:30 PM PDT To: textmate@lists.macromates.com Subject: Simple textmate applescripting question Reply-To: wgscott@chemistry.ucsc.edu
Hi:
I am trying to write a simple osascript command-line utility that acquires the directory of the file displayed in the frontmost TextMate editor window, and am having trouble.
I've been trying to use applescript syntax such as this:
osascript<< END tell application "TextMate" activate do shell script "echo $TM_DIRECTORY" end tell END
but the variable $TM_DIRECTORY is apparently empty.
Is there another way to accomplish this, with or without applescripting? (I'd prefer a less pathological scripting language.)
Thanks.
Bill