Hello World, I am trying to export a MOV file to GIF using Photoshop with Applescript via the Export - Save For Web command. Currently I am recieving an error after the export command
Can anybody help me with this error?
Here is my Code:
set fileCounter to 0
set mfolder to choose folder with prompt "Choose folder to Convert" default location (path to desktop)
--THis gets the angle in which you need to Rotate the image
set alert_message to ("Please Choose a Rotation Angle:") as Unicode text
display dialog the alert_message buttons {"-90", "90", "0"} default button 3 with icon 1
set the rotate_Choice to the button returned of the result as real
--THis sets the placement choice of the logo
set logo_Placement to first item in (choose from list {"Lower Center", "Lower Right", "None"} with prompt "Where would you like the logo placed?") as string
--set dfolder to choose folder with prompt "Choose destination folder" default location (path to desktop)
tell application "Finder"
launch
set fileList to files of (mfolder) as alias list
if exists folder "Processed GIFs" of mfolder then
delete folder "Processed GIFs" of mfolder
end if
set dfolder to make new folder at mfolder with properties {name:"Processed GIFs"}
end tell
repeat with j from 1 to (number of fileList)
set wFile to item j of (fileList)
set fileCounter to fileCounter + 1
--this asks Photoshop to open each item, Rotate the canvas if desired, place the logo as a new layer (* not yet implemented), and then export to GIF
tell application "Adobe Photoshop CS3"
try
open (wFile) showing dialogs never
set docRef to current document
tell docRef
if rotate_Choice is not 0 then rotate canvas docRef angle rotate_Choice
--if logo_Placement is not "None" then Add new layer at logo_Placement
set myExportOptions to {class:save for web export options, web format:CompuServe GIF, colorReduction:perceptual, colors:256, lossy:0, dither:diffusion, ditherAmount:100, transparency:false}
export docRef in ((dfolder) as alias) as save for web with options myExportOptions
close current document saving no
end tell
on error
--
end try
end tell
end repeat
display dialog "You Have Converted " & fileCounter & " Files." buttons {"OK"}
Model: MacBook Pro
AppleScript: 2.1.1
Browser: Safari 531.21.10
Operating System: Mac OS X (10.6)