Capture Tag and Untag operation

Adobe Community Professional ,
Mar 29, 2022 Mar 29, 2022

Copy link to clipboard

Copied

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?

 

Best regards
TOPICS
How to , Scripting

Views

81

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 08, 2022 Apr 08, 2022

Copy link to clipboard

Copied

Hey

 

How's it going?

 

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

It's not very clear from what you describe.

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

LATEST

Hi,

Here is what I am doing.

 

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

Screen Shot 2022-04-25 at 8.17.08 PM.png

 

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines