• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invalid key form
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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]


  • Prev by Date: Re: Line count of a referenced text file?
  • Next by Date: Re: Line count of a referenced text file?
  • Previous by thread: Re: Invalid key form
  • Next by thread: Re: Scripting Palm Desktop
  • Index(es):
    • Date
    • Thread