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