I get the error>
tell application “Adobe Photoshop CS5.1”
activate
get name of current document
→ “FR10ER10249CY2RG.JPG”
Result:
error “Can’t make "AL" into type boolean.” number -1700 from “AL” to boolean
I’ve had this working so far I assume it because I added the or function? Why should that condition change it?
tell application "Adobe Photoshop CS5.1"
activate
set textName to name of current document
set the1stLetter to the first character of textName --> the 1st letter
set the2ndLetter to the second character of textName --> the 2nd letter
set the5thLetter to the fifth character of textName --> the 5th letter
set the6thLetter to the sixth character of textName --> the 6th letter
set ItemType to {the5thLetter, the6thLetter} as text
set brandID to {the1stLetter, the2ndLetter} as text
if brandID is equal to "BH" or "AL" or "SM" then
set targetWidth to 1348
set targetHeight to 1832
else if brandID is equal to "BU" or "TM" then
set targetWidth to 1020
set targetHeight to 1385
else if brandID is equal to "ES" then
set targetWidth to 1280
set targetHeight to 1740
else if brandID is equal to "DV" or "DJ" or "RA" then
set targetWidth to 1000
set targetHeight to 1360
else if brandID is equal to "FR" or "WA" or "NN" then
set targetWidth to 1020
set targetHeight to 1530
else if brandID is equal to "MA" or "MB" or "MC" or "MF" or "MH" or "FI" then
set targetWidth to 1000
set targetHeight to 1400
end if
end tell