I have a problem that is just escaping me…
I know I’m missing something fundamental in this.
set myLabelCode to choose from list {"MHK10", "SF103", "KAR01", "WDR3X3"}
if result is "MHK10" then
set input to MHK10
else if result is "SF103" then
set input to SF103
else if result is "KAR01" then
set input to WDR3X3
end if
set MHK10 to {2, 2, 5, 5}
set SF103 to {4, 4, 8, 8}
set KAR01 to {8, 8, 10, 10}
set WDR3X3 to {0, 0, 1, 1}
Returns {0, 0, 1, 1} no matter what I choose in the pop up list. How do I separate the items?
The input variable is something I want to inject into a handler like so:
tell application "Adobe InDesign CS5"
set myLabelCode to choose from list {"MHK10", "SF103", "KAR01", "WDR3X3"}
end tell
if result is "MHK10" then
set input to MHK10
else if result is "SF103" then
set input to SF103
else if result is "KAR01" then
set input to WDR3X3
end if
set MHK10 to {2, 2, 5, 5}
set SF103 to {4, 4, 8, 8}
set KAR01 to {8, 8, 10, 10}
set WDR3X3 to {0, 0, 1, 1}
on mybigfatsquare(result)
tell application "Adobe InDesign CS5"
set myMaster to applied master of page 1 of document 1
tell myMaster
set myQRrectangle to make rectangle with properties {geometric bounds:result, fill color:swatch id 14, label:"QRCODE"}
set pattern of myQRrectangle to "Lines" --This has to be exactly the name of the Pattern Style
set pattern parameters of myQRrectangle to "Line Distance:12~Angle:20~Iterations:4~Stroke Weight:1~Dashes:true~Dash Length:12~Gap Length:6~Random Dash:true~Stroke Color:0 0 0 1 setcmykcolor ~" --these parameters are only valid for the 'Lines' pattern, will need to get properties of complete QR pattern
end tell
end tell
end mybigfatsquare
mybigfatsquare(result)
but it always wants to put 0, 0, 1, 1 in there. I kind of think there’s something about when I’m setting input, applescript is ignoring my if/ else if, and just setting input as each item until it ends with 0, 0, 1, 1.
Thanks!