PDA

View Full Version : applescript error




natcarish
Jun 27, 2009, 05:50 AM
I have been using this script for some time now with no problems, but suddenly I get this error (I have updated the OS since using it), any ideas as to what's wrong? All the folders definitely exist.

script:

tell application "Finder"
set destination to choose folder with prompt "Choose the destination"
choose folder with prompt "Choose the Job folder"
set subfolders to every folder of result
repeat with thisSubfolder in subfolders
repeat with ProcessedFolder in thisSubfolder
tell application "Finder"
if name of ProcessedFolder contains "Output" then
if not (exists (folder (((destination as alias) as text) & ((name of ProcessedFolder) as text)))) then
if (count items of ProcessedFolder) > 0 then
copy folder (ProcessedFolder as alias) to folder (destination as alias)
end if
end if
end if
end tell
end repeat
end repeat
end tell


Event log:

tell application "Finder"
choose folder with prompt "Choose the destination"
alias "G-DRIVE mini:5031DA_Going_Out_Formal_David_Anthony:"
choose folder with prompt "Choose the Job folder"
alias "HD370:5031DA:"
get every folder of alias "HD370:5031DA:"
"Finder got an error: Canít get alias \"HD370:5031DA:\"."



mysterytramp
Jun 27, 2009, 11:22 PM
I ran the script on my machine, but commented out the second tell block. Checked event log and result history and everything seemed to work fine. I'm running Leopard.

mt

sammich
Jun 27, 2009, 11:23 PM
Hang on...what happened to the thread before? It had like 10 replies in it?

natcarish
Jun 28, 2009, 03:22 AM
I tried that, but it's still the same; besides, the error occurs before it even reaches the second 'tell' block.

natcarish
Jun 28, 2009, 04:28 AM
Well, that's typically weird computer. I restarted the machine (I had done this before) and now it works as normal???

This machine is definitely acquiring an attitude!