[TxMt] Re: Is the make new document AppleScript command working?
André Berg
andre.berg at email.de
Sun Jul 6 13:52:59 UTC 2008
Cool. Thank you for your reply.
I don't have to use the AppleScript command, but it's the shortest way for
creating a fresh document that's not associated with a physical file on disk
yet.
What started as an AppleScript exercise, I am now trying to script a
workaround for the missing "Edit in TextMate" menu option in Xcode 3.
I installed TM as the Input Manager as described in the blog for Leopard and
it's working for many applications. Save Xcode. So I have a script for
getting the actual displayed buffer from Xcode and sending it to TM by
creating a new untitled window. As you can see I like using TM in tandem
with Xcode 3. It's very powerful.
With the
do shell script "mate " & "/tmp/" & random_file_name
I could create a new document, open that in TM and
tell the front document
insert buffer
end tell
appears to work for setting the document contents to the buffer from Xcode.
Again thanks for your help.
André
--- Original Nachricht ---
Absender: Hans-Jörg Bibiko
Datum: 06.07.2008 10:28 Uhr
> On 06.07.2008, at 05:44, André Berg wrote:
>
>> Hi,
>>
>> I am trying to get this basic command to work. Here's my script:
>>
>> tell application "TextMate"
>> activate
>> make new document
>> end tell
>>
>> I am getting an error message in German which loosely translates to:
>>
>> "TextMate" has recieved an error: Error in the AppleEvent routine"
>>
>
> TextMate 1.x supports only very few AppleScript commands.
>
> Do you have to use AppleScript in order to create a new document?
>
> Because, you can do this:
> - e.g. as shell command: mate ~/Desktop/TEST.txt (this can be used
> inside of AppleScripts do shell)
> [to install the mate command go to Help > Terminal Usage]
> - e.g. as Web URL : txmt://open/?url=file://~/Desktop/TEST.txt
>
> and some other ways.
>
> Servus
> --Hans
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
More information about the textmate
mailing list