How do I make a new document in TextMate using rb-appscript or AppleScript?
Here is my rb-appscript:
te = app("TextMate")
te.launch
doc = te.make(:new => :document)
But it doesn't work.
Here is the error message I get:
OSERROR: -10000
MESSAGE: Apple event handler failed.
COMMAND: app("/Applications/TextMate.app").make({:new=>:document})
If someone gives me an AppleScript code I can convert it to rb-appscript.
Technically, it's supposed to be just this:
But I get the same error in Script Debugger. Creating a new document manually and getting the document via a script works fine. I'm going to say you found a bug in TextMate's Applescript implementation. You could go the GUI scripting route here (shamelessly copied from the Mac OS Automation site):