set theFolder to choose folder with prompt "Create/Choose Client Project folder"tryset briefFolder to ((theFolder as text) & "Brief") as aliason errortell application "Finder"set briefFolder to (POSIX path of briefFolder) & "x.tasks"do shell script ("touch " & briefDoc & " ;mate " & briefDoc)end trytell application "Finder"set capturesFolder to make new folder at theFolder with properties {name:"Captures"}set processedFolder to make new folder at theFolder with properties {name:"Processed"}set HiResFolder to make new folder at processedFolder with properties {name:"High-Res Images"}set LoResFolder to make new folder at processedFolder with properties {name:"Low-Res Images"}set trashFolder to make new folder at theFolder with properties {name:"Trash"}end tell
On Mon, Mar 17, 2008 at 8:32 PM, pascal@g <ymostudio@gmail.com> wrote:the principle of the script was to create folders and sub-folders, thencreate a new document in one of them with my text editor, save it with atitle, bringing it to the front for entry.
If you delete everything after the 'tell application "Finder"' clause and insert
set briefDoc to (POSIX path of briefFolder) & "$.tasks"
do shell script ("touch " & briefDoc & "; mate " & briefDoc)
it should do what you want. I have to say that the use of a dollar
sign as a file name scares me a bit because it's a special character
in the shell, but with this change the script worked for me.
(I am curious why the creation of the Captures folder isn't put into a
'try/on error' block like the creation of the Briefs folder, but I'm
sure you have your reasons.)I have posted an entry on MacScripter, to hear that TextMate was "poorlyscriptable, even Standard Suite is badly implemented".any solution to contradict that?!
TextMate is certainly not as AppleScriptable as BBEdit, but it is far
more scriptable with Perl, Python, Ruby, and the shell. In my book,
this is a big win for TextMate and the reason I switched a couple of
years ago.
--
Dr. Drang
______________________________________________________________________
For new threads USE THIS: textmate@lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate