Re: Invalid key form
Re: Invalid key form
- Subject: Re: Invalid key form
- From: "Marc K. Myers" <email@hidden>
- Date: Mon, 12 Nov 2001 23:21:10 -0500
- Organization: [very little]
>
Date: Mon, 12 Nov 2001 14:51:49 -0500
>
To: email@hidden
>
From: Chad Gray <email@hidden>
>
Subject: Invalid key form
>
>
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 "list folder" doesn't return full paths and it returns strings.
Therefore "theFile" isn't a Finder object, it's a string. A few lines
up you use "file ((inFolder as text) & theFile)". You need the same
kind of reference in the "move" statement.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[11/12/01 11:20:36 PM]