OK, i cannot figure this one out.
in Photoshop CS3/4 we are able to set a variable like
set saveOptions to {class:JPEG save options, embed color profile:false,
quality:12}
But… what if i had a variable of the quality like
set qlty to 5
how do i embed that variable while creating the class variable?
this does not work, which i understand why, but cannot figure out another way:
set saveOptions to {class:JPEG save options, embed color profile:false, quality:
& qlty}
i cannot create it as a string like:
set saveOptions to “{class:JPEG save options, embed color profile:false,
quality:” & qlty & “}”
gives PSP an error while executing
:o
Never mind, what i did was set default variable, then change value after the fact.
set psp_SaveOptions to {class:EPS save options, encoding:none, preview type:none}
if pref_Preview is "None" then
set preview type of psp_SaveOptions to none
else if pref_Preview is "TIFF (1 bit/pixel)" then
set preview type of psp_SaveOptions to monochrome TIFF
else if pref_Preview is "TIFF (8 bits/pixel)" then
set preview type of psp_SaveOptions to eight bit TIFF
else if pref_Preview is "Macintosh (1 bit/pixel)" then
set preview type of psp_SaveOptions to monochrome Mac OS
else if pref_Preview is "Macintosh (8 bits/pixel)" then
set preview type of psp_SaveOptions to eight bit Mac OS
else if pref_Preview is "Macintosh (JPEG)" then
set preview type of psp_SaveOptions to JPEG Mac OS
else
return "ERROR"
end if
if pref_Encoding is "ASCII" then
set encoding of psp_SaveOptions to ASCII
else if pref_Encoding is "ASCII85" then
set encoding of psp_SaveOptions to ASCII
else if pref_Encoding is "Binary" then
set encoding of psp_SaveOptions to binary
else if pref_Encoding is "JPEG (low quality)" then
set encoding of psp_SaveOptions to low quality JPEG
else if pref_Encoding is "JPEG (medium quality)" then
set encoding of psp_SaveOptions to medium quality JPEG
else if pref_Encoding is "JPEG (high quality)" then
set encoding of psp_SaveOptions to high quality JPEG
else if pref_Encoding is "JPEG (maximum quality)" then
set encoding of psp_SaveOptions to maximum quality JPEG
else
return "ERROR"
end if
return psp_SaveOptions