Ok first of all id like to welcome myself in the forums which have been helping me alot in scripting for ages
Now to my problem:
I wrote this code:
tell application "Finder"
try
make new folder at desktop with properties {name:"OUTPUT_JPEGS_FROM_PDF"}
end try
set myFolder to choose folder with prompt "Bitte Eingabeordner wählen!"
set myFileList to items in myFolder
set myFolderout to choose folder with prompt "Bitte Ausgabeordner wählen"
set dpires to text returned of (display dialog "Bitte DPI angeben:" default answer "72") as integer
set thecropboxentry to choose from list {"crop box", "media box", "trim box", "bleed box", "art box"}
set thecropbox to thecropboxentry as string
repeat with k from 1 to length of myFileList
my myAction(item k of myFileList as alias, myFolderout, dpires, thecropbox)
end repeat
activate
display dialog "Done"
end tell
on myAction(myFile, myFolderout, dpires, thecropbox)
with timeout of 86400 seconds
tell application "Adobe Photoshop CS4"
open myFile with options {resolution:dpires, crop page:thecropbox}
save current document in alias myFolderout as JPEG with options {quality:12} appending lowercase extension copying 1
close current document without saving
end tell
end timeout
end myAction
Now the problem part is this one:
crop page:thecropbox
this results in photoshop getting the one i chosen from the list as so: crop page:"media box"
which it cannot handle. Photoshop needs the string without quotes, so it can handle it as an option and not a text string like so: crop page:media box
Now question is, how to parse the chose from list result as an option type string without quotes?
TIA
Ultra