Copy link to clipboard
Copied
Hi there,
I cannot get an applescript running that creates various QR codes (VCards). I found the command "Create vCard QR Code" but now further documentation or script example. Can anybody help?
Thanks in advance,
Martin
Copy link to clipboard
Copied
The AppleScript implementation of QR codes in InDesign seems like a hacked-on afterthought. I tried the command like so:
set qr to Create Plain Text QR Code document 1 plain text "stuff" qr code swatch "Green"
That loaded the Place Gun, which is the least scriptable action you'd ever expect. Then I wondered if the vague direct object could be something besides a document, so I tried:
set qr to Create Plain Text QR Code text frame 1 of document 1 plain text "stuff" qr code swatch "Green"
That works, but it replaces the entire content of the text frame with the QR object. Trying to specify an insertion point only causes a crash, so InDesign is too dumb to do that. So I guess the thing to do is to first create a rectangle, then specify that as the direct object. What I can't figure out is how to get rid of the stupid blank margin is puts around the actual QR code. It seems to give it 11pt of space on all 4 sides if the target box is 100x100pt. So I guess you have to move and resize the resulting eps object to fit based on that knowledge and hope it's consistent from version to version.
Copy link to clipboard
Copied
Steve, are you sure that "stupid blank margin" is greater than the required Quiet Zone? (Required per specifications: The Quiet Zone | qrworld )
Copy link to clipboard
Copied
Yes, when there is no easy way to control it. There should at least be a boolean keyword and checkbox in the UI to let the user turn it off if they know what they're doing. But let's focus on the part where I supplied a valid answer to the question.