Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

Capture Tag and Untag operation

Community Expert ,
Mar 29, 2022 Mar 29, 2022

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
172
Translate
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
Community Expert ,
Apr 08, 2022 Apr 08, 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.

 

 

Translate
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
Community Expert ,
Apr 25, 2022 Apr 25, 2022
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
Translate
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