[TxMt] TextMate vs Applescript
pascal@g
ymostudio at gmail.com
Tue Mar 18 01:32:44 UTC 2008
hi, first post to this forum, after switching from BBEdit to TextMate.
while I'm discovering everyday the benefit of this change, I came
across a syntax problem with a Applescript I was using successfully
with BBEdit.
the principle of the script was to create folders and sub-folders,
then create a new document in one of them with my text editor, save it
with a title, bringing it to the front for entry.
changing the app to TextMate, I get an error:
[quote] AppleEvent Handler failed: expect end of line but get "to" [/
quote]
I have posted an entry on MacScripter, to hear that TextMate was
"poorly scriptable, even Standard Suite is badly implemented".
any solution to contradict that?!
below the script in question:
> set theFolder to choose folder with prompt "Create/Choose Client
> Project folder"
> try
> set briefFolder to ((theFolder as text) & "Brief") as alias
> on error
> tell application "Finder" to set briefFolder to make new folder at
> theFolder with properties {name:"Brief"}
> end try
> tell application "Finder"
> set capturesFolder to make new folder at theFolder with properties
> {name:"Captures"}
> end tell
> tell application "TextMate" -- was BBEdit
> set briefDoc to make new document at beginning with properties
> {name:"$.tasks"} -- was "$.todo"
> save briefDoc to ((briefFolder as text) & "$.tasks")
> end tell
> tell application "TextMate" to activate -- was BBEdit
--
cheers, Pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20080318/6fdaa943/attachment.html>
More information about the textmate
mailing list