Skip to main content
Charu Rajput
Community Expert
Community Expert
March 29, 2022
Question

Capture Tag and Untag operation

  • March 29, 2022
  • 1 reply
  • 233 views

Hello all,

Is there a way to capture or any event that is fired in Indesign when user tag or untag page elements from Tags panel?

 

This topic has been closed for replies.

1 reply

Community Expert
April 9, 2022

Hey

 

How's it going?

 

What is happening here - what are you trying to achieve? 

It's not very clear from what you describe.

 

 

Charu Rajput
Community Expert
Community Expert
April 26, 2022

Hi,

Here is what I am doing.

 

1. I have two tags in my Tags panel named as "text" and "image" as shown below

 

2. When I select the frame, and click on "image" tag, I want to know that some item is tagged, so that I can do some processing as soon as frame is tagged.

var _tag = app.menuActions.itemByName("$ID/Tag Frame...")
_tag.addEventListener("beforeInvoke", function(){
    alert("tag")
})

var _unTag = app.menuActions.itemByName("$ID/Untag Frame")
_unTag.addEventListener("beforeInvoke",  function(){
    alert("Un tag")
})

 

Above code, is working when I untag frame from menu actions(by selecting frame --> right click --> Untag frame), which makes sense because event is attached to the menu action.

 

Following issue in above script

a) it is not working when I do Untag operation from Tags panel

b) Tag Frame event not working even tagging from the menu or from Panel. Am I using wrong name of events or wrong event listeners.

 

Best regards