views:

22

answers:

1

So I've opened Textmate using Applescript, how do I tell it to open a specific folder?

EDIT: Tried Josh K's suggestion, but a strange error occurs. I ran this line:

do script "mate rails_projects/newproject"

And here is the result:

bens-macbook-pro:~ ben$ mate rails_projects/newproject
mate: failed to establish connection with TextMate.

But then, in the same console window, I'll type the same line that just failed,

bens-macbook-pro:~ ben$ mate rails_projects/newproject

and it works. Why would this be happening?

+2  A: 

I would point the AppleScript to run the mate [folder] command, which will open TextMate with the specified folder.

Josh K
Thanks for your suggestion. I tried it and got a weird error, which I put into the question above.
ben
fixed it, just ran ls first, seems to work. thanks!
ben