我使用一个简单的 Applescript 函数来为通过工作室的工作创建客户端项目文件夹。
这是一个久经考验且值得信赖的脚本,已经使用了大约 7 年左右,并且运行良好。
由于某种原因,脚本似乎突然停止工作,并且不会在最终文件夹层次结构中包含作业编号。它现在创建一个名为“OK OK”的文件夹,其中包含正确的文件夹结构,但没有作业编号。
我确实尝试了所有方法,但现在我心情沉重,大脑疲倦,正在寻求帮助!
这是我当前的脚本:
tell application "Finder"
activate
set the jobnumber to "[jobnum] "
set the jobtitle to "[jobtitle] "
repeat
display dialog "Enter the job number:" default answer the jobnumber buttons {"Cancel", "OK"} default button 2
copy the result as list to {the jobnumber, the button_pressed}
if the jobnumber is not "" then exit repeat
end repeat
repeat
display dialog "Enter the job title:" default answer the jobtitle buttons {"Cancel", "OK"} default button 2
copy the result as list to {the jobtitle, the button_pressed}
if the jobtitle is not "" then exit repeat
end repeat
set the jobtitle to jobnumber & " " & jobtitle
set deskpath to desktop
make new folder at deskpath with properties {name:jobtitle}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " Admin"}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " Final Artwork"}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " Links"}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " PDFs"}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " Resources"}
make new folder at folder jobtitle of deskpath with properties {name:jobnumber & " Visuals"}
make new folder at folder (jobnumber & " PDFs") of folder jobtitle of deskpath with properties {name:jobnumber & " Old PDFs"}
make new folder at folder (jobnumber & " Admin") of folder jobtitle of deskpath with properties {name:jobnumber & " Supplier Estimates"}
make new folder at folder (jobnumber & " Links") of folder jobtitle of deskpath with properties {name:jobnumber & " Workings & Resources"}
make new folder at folder (jobnumber & " Visuals") of folder jobtitle of deskpath with properties {name:jobnumber & " Visual Links"}
make new folder at folder (jobnumber & " Resources") of folder jobtitle of deskpath with properties {name:jobnumber & " Supplied Files"}
end tell
如果有人能阐明为什么这只是停止工作,或者愿意就如何解决这个问题提供指导,那么我将非常感激!
我不介意它是否是一个全新的脚本......我只需要它再次工作!
提前感谢大家。
马特