Skip to main content
Inspiring
July 21, 2022
Answered

Interactive object via script label

  • July 21, 2022
  • 1 reply
  • 449 views

I'd need to populate a frame with QR codes. In the script label panel this code is working fine:

frame:qrcodehyperlink(field('QR'),'QR');

frame:fitcontent();

I wonder if it's possible to add code here to get interactivity for this frame. The purpose is to export a pdf that will have interactivity on the QR itself so a reader can just click it without the need of grab it again with his smartphone. Previously I achieved this by overlapping two grouped frames but although working it seems a "dirty" solution.

Thank you

This topic has been closed for replies.
Correct answer Gioyer07

Thank you Brian

I forwarded this post to the Easy Catalog Support.

From my attempts to implement your code I get (from Indesign warning box) this answer when trying to populate the frame:

3: function argument expected near ';' frame:qrcodehyperlink(field('QR'),'QR');... (the box probably cuts part of the message)

So no, I guess that Easy Catalog doesn't support activeDocument (I know there's LUA involved but don't know if this comment is pertinent). Will write here any development as this would be an interesting extra feature.


Answer from Easy Catalog Support came. The method is to convert the frame to an Indesign's button and then set in the incoming "data" (Easy Catalog Control panel) the necessary instruction to get the correct url.

1 reply

Gioyer07Author
Inspiring
July 21, 2022

More about the post: the above script workswith my Easy Catalog plugin and picks the url from database to generate the QR icon. This icon is not interactive and the post is asking if some other code cane be added for this purpose. Thank you.

brian_p_dts
Community Expert
Community Expert
July 21, 2022

I was wondering why the code didn't make sense; EasyCatalog has different nomenclature. You want to add a hyperlink to the QR code? 

If so, try this, though I'm not sure the naming is right for EasyCatalog scripting. Not sure if it supports activeDocument

app:activeDocument:hyperlinks:add(app:activeDocument:hyperlinkPageItemSources:add(frame), app:activeDocument:hyperlinkURLDestinations:add(field('QR'));

 

Gioyer07Author
Inspiring
July 22, 2022

Thank you Brian

I forwarded this post to the Easy Catalog Support.

From my attempts to implement your code I get (from Indesign warning box) this answer when trying to populate the frame:

3: function argument expected near ';' frame:qrcodehyperlink(field('QR'),'QR');... (the box probably cuts part of the message)

So no, I guess that Easy Catalog doesn't support activeDocument (I know there's LUA involved but don't know if this comment is pertinent). Will write here any development as this would be an interesting extra feature.