Trouble moving script to OSX
Trouble moving script to OSX
- Subject: Trouble moving script to OSX
- From: Drew Fiero <email@hidden>
- Date: Wed, 09 Jan 2002 12:12:46 -0800
Hey,
I have a script I've used for a long time under OS 9 and I'm having trouble
getting it to run under OS X.1.2.
It's kind of long but I'm going to enclose it to make it easier to trouble
shoot.
Thanks for any advice,
Drew Fiero
-----------------------------------
property pathVar : ""
property jobName : ""
property job_folder : ""
tell application "Finder"
activate
set i to 0
set job_folder to ""
set pathVar to (choose folder with prompt "Choose the drive/folder where
you'd like the job to live.") as string
display dialog "Client/Project name?" default answer " "
set jobName to (text returned of result) as string
end tell
repeat while tryName() is false
set i to i + 1
if i = 5 then
exit repeat
end if
end repeat
tell application "Finder"
activate
make new folder with properties {name:"ae_proj"} at job_folder
make new folder with properties {name:"psd_ele"} at job_folder
make new folder with properties {name:"ill_ele"} at job_folder
make new folder with properties {name:"renders"} at job_folder
make new folder with properties {name:"images"} at job_folder
make new folder with properties {name:"audio"} at job_folder
make new folder with properties {name:"moving_ele"} at job_folder
set myEle to make new folder with properties {name:"3D_ele"} at
job_folder
make new folder with properties {name:"scenes"} at myEle
make new folder with properties {name:"psd_picts"} at myEle
make new folder with properties {name:"objects"} at myEle
make new folder with properties {name:"renders"} at myEle
make new folder with properties {name:"scans"} at job_folder
make new folder with properties {name:"footage"} at job_folder
end tell
on tryName()
tell application "Finder"
try
activate
if folder (pathVar & jobName) exists then
set jobName to (display dialog "The folder \"" & jobName &
"\" already exists, enter a different name." default answer jobName) as
string
return false
else
set job_folder to make new folder with properties
{name:jobName, current view:"as list"} at folder pathVar
return true
end if
on error errorMessage
set jobName to jobName & "1"
return false
end try
end tell
end tryName