TextMate list,
how can I command TextMate to create a new untitled document from a separate process? Basically, I want textmate to create a new window (titled 'untitled n', that does not have a file path associated with it yet.
Can you do this somehow thru the mate command line command? typing just 'mate' seems to activate textmate.app, but it doesn't guarantee that a new window will be opened (which is good). typing 'mate new' (replace new with whatever title you want for your doc) creates a new file with a path of /new. I would like to create a new file that does not have any path info yet. any ideas?
Todd Ditchendorf
Scandalous Software - Mac XML Developer Tools http://scan.dalo.us
I would say
$ osascript -e 'tell application "TextMate" to make new document'
but that doesn't seem to work properly. However,
$ osascript -e 'tell application "TextEdit" to make new document'
works for TextEdit. Methinks this is a TextMate bug. Allan?
Peter
On 3/11/07, Todd Ditchendorf itod@mac.com wrote:
TextMate list,
how can I command TextMate to create a new untitled document from a separate process? Basically, I want textmate to create a new window (titled 'untitled n', that does not have a file path associated with it yet.
Can you do this somehow thru the mate command line command? typing just 'mate' seems to activate textmate.app, but it doesn't guarantee that a new window will be opened (which is good). typing 'mate new' (replace new with whatever title you want for your doc) creates a new file with a path of /new. I would like to create a new file that does not have any path info yet. any ideas?
Todd Ditchendorf
Scandalous Software - Mac XML Developer Tools http://scan.dalo.us
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On 3/11/07, Todd Ditchendorf itod@mac.com wrote:
TextMate list,
how can I command TextMate to create a new untitled document from a separate process? Basically, I want textmate to create a new window (titled 'untitled n', that does not have a file path associated with it yet.
Peter Jaros wrote:
I would say
$ osascript -e 'tell application "TextMate" to make new document'
but that doesn't seem to work properly. However,
$ osascript -e 'tell application "TextEdit" to make new document'
works for TextEdit. Methinks this is a TextMate bug. Allan?
If "Enable assistive devices" is enabled (see http://www.mactech.com/articles/mactech/Vol.21/21.06/UserInterfaceScripting/...), something like
tell application "System Events" tell process "TextMate" set frontmost to true click menu item "New" of menu "File" of menu bar 1 end tell end tell
should do it. Or as a shell script:
osascript <<APPLESCRIPT tell application "System Events" tell process "TextMate" set frontmost to true click menu item "New" of menu "File" of menu bar 1 end tell end tell APPLESCRIPT
On 11. Mar 2007, at 22:14, Peter Jaros wrote:
$ osascript -e 'tell application "TextMate" to make new document'
but that doesn't seem to work properly. However,
$ osascript -e 'tell application "TextEdit" to make new document'
works for TextEdit. Methinks this is a TextMate bug. Allan?
TextMate doesn’t support (much) AppleScript -- this wasn’t a priority for 1.x, not a bug ;)