Scripting Indesign QR Codes

Sorry in advance if this has already been covered (but I can’t find it if it has)

I’m trying to write an AppleScript to generate different QR Codes which direct the user to different websites depending on the value in the variable “QRlink”.

I can easily generate the QR code but I can’t find how to set the property ‘url link’. It looks from the AppleScript Indesign Dictionary as though it should be simple but I’ve spent hours trying different things and searching the web.

Hopefully someone can help.

Kenny

Hi. Perhaps this is a new feature, but—to my knowledge—InDesign has no facility to handle QR codes, as the link is integral to the graphic itself. ID can specify a hyperlink’s destination URL, however, doing so could potentially direct you to a location other than what is embedded/scannable.

Hi there,

Does this help any?


tell application "Adobe InDesign CC 2018"
	
	set myRectangle to make new rectangle of active document with properties {geometric bounds:{20, 20, 70, 70}}
	
	set theQRCodeText to "Hello World!" & return
	set theQRCodeText to theQRCodeText & "01234 567890" & return
	set theQRCodeText to theQRCodeText & "www.this-website.co.uk"
	
	Create Plain Text QR Code myRectangle plain text theQRCodeText qr code swatch "C=0 M=0 Y=0 K=100"
	
end tell