TextMate / BBEdit script syntax error

hi,
I get a syntax error on the section of this script below after changing the application to TextMate.
was working just fine with BBEdit, but about line 3, I get: “expected end line, but found “to””
any idea how to fix this?

[…]
tell application “TextMate”
set thisDoc to make new document at beginning with properties {name:“minute.tasks”}
save thisDoc to ((docFolder as text) & “minute.tasks”)
end tell

cheers,

I don’t have TextMate, but this puts a Tex-Edit Plus file on my hard drive.

tell application "Tex-Edit Plus"
	activate
	set thisDoc to make new document
	set docFolder to "minute.tasks"
	save thisDoc in (docFolder)
end tell

…and this puts a BBEdit file on my hard drive.

tell application "BBEdit"
	activate
	set thisDoc to make new document
	set docFolder to "minute.tasks"
	save thisDoc to (docFolder)
end tell

I hope this helps.

Tom

Browser: Safari 525.13
Operating System: Mac OS X (10.4)

Hi,

Read the dictionary:
save i[/i]Save an object. (from Standard Suite)
COMMAND SYNTAX
save reference ¬
as unicode text The file type in which to save the data.¬
in alias The file in which to save the object.

hummm, not really with TextMate, Tom…
get an error: “AppleEvent Handler failed”
it seems the “make new document” cause the pbl.
I have played with elements you proposed, with no luck.
thanks for trying anyway. hopefully the solution will come through…

The syntax of make new is either

make new whatever at beginning of whatevers with properties {name:"myName"}

or

make new whatever with properties {name:"myName"}

hi Stefan
I learnt the make document “ in fact, from studying the implementation of this very same script you kindly made up for me in a previous post.
still, when just changing the application from BBEdit to TextMate, I get the error mentioned above:

again, it’s working fine with BBEdit… but I switched to TextMate, and would like to implement my workflow with it.
let me put the full script:

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 "BBEdit" set briefDoc to make new document at beginning with properties {name:"$.tasks"} save briefDoc to ((briefFolder as text) & "$.tasks") end tell tell application "BBEdit" to activate
could it be TextMate syntax?

TextMate is poorly scriptable, even the Standard Suite is badly implemented.

The Make new and save commands don’t work.
Must it be TextMate? BBEdit or its little free brother TextWrangler are much better scriptable

hi Stefan
I finally got the solution to this syntax problem with TextMate:
(this is only the last part of it)

set briefDoc to (POSIX path of briefFolder) & "$.tasks" do shell script ("touch " & briefDoc & "; open -a TextMate " & briefDoc)
.tasks for a simple and handy TM Tasks Bunble (for those interested)

to comment briefly on my transition from BBEdit, I have found TextMate features a big time saving, particularly for HTML and CSS coding.
similar impression for Markdown with the ability to create links with a single shortcut, do math as quickly, etc.
I am sure there are some down side for more serious programers like yourself, but it seems that a genuine community helps improving the app all the time.

thanks again for your help (you were the one the make the script in the first place!).
cheers,