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
Read the dictionary: savei[/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…
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?
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,