Re: Invalid key form
Re: Invalid key form
- Subject: Re: Invalid key form
- From: Shane Stanley <email@hidden>
- Date: Tue, 13 Nov 2001 13:41:07 +1100
On 13/11/01 6:51 AM +1000, Chad Gray, email@hidden, wrote:
>
Hello... Im making an application that looks at a hot folder, and runs a
>
photoshop action on the files in the hot folder. Everything is working
>
until i try to move the file out of the hot folder to another folder.
>
>
Im getting an Invalid Key form when i hit the line: move theFile to folder
>
"MAC18:Processed:"
>
>
Any tips or ideas?
>
>
>
on catalogIncomingImages()
>
tell application "Finder"
>
set filelist to (list folder inFolder without
>
invisibles)
>
>
repeat with i from 1 to (count item in filelist)
>
set theFile to item i of filelist
>
tell application "Adobe( Photoshop( 5.5"
>
activate
>
open file ((inFolder as text) & theFile)
>
do script "Action4" -- set to your PS action
>
set fileName to ((inFolder as text) & theFile)
>
end tell
>
move theFile to folder "MAC18:Processed:"
>
end repeat
>
>
set processedFiles to filelist
>
end tell
>
end catalogIncomingImages
Your variable theFile is just the name of the file -- you need the full
path, which you (confusingly) store in a variable called fileName. Try
modifying like so:
set filePath to ((inFolder as text) & theFile)
move file filePath to folder "MAC18:Processed:"
--
Shane Stanley, email@hidden