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

Event Listener for Text Frame Placement/Edits?

New Here ,
Nov 14, 2016 Nov 14, 2016

Copy link to clipboard

Copied

Hi All!

I'm looking for some way to tell my script that a text frame has been placed or edited, so I can take an action based on that.

All of the documentation I've read doesn't suggest any type of listener for text frames, but I'm hoping someone here can point me in the right direction!

Any suggestions?

Thanks!

TOPICS
Scripting

Views

1.4K

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
Community Expert ,
Nov 14, 2016 Nov 14, 2016

Copy link to clipboard

Copied

There's an AFTER_PLACE property for the textFrame event listener. That should give you what you're after.

P.

Votes

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
New Here ,
Nov 14, 2016 Nov 14, 2016

Copy link to clipboard

Copied

Hey pkahrel!

Thanks for the comment.

I've actually already tried using the AFTER_PLACE property, but it didn't work. After researching why, I came across the info that BEFORE_PLACE and AFTER_PLACE is only for placed assets. Meaning the handler will only be called for assets that are placed (anything that shows up in the links panel)

Votes

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
Community Expert ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

Ok, I didn't know that (I'm not too familiar with event handlers). The only event I use sometimes is afterSelectionChanged. You could use it to check whether a text frame that's deselected has the same content as it did before it was selected. (afterSelectionChanged doesn't tell you whether a selection's content has changed, but whether the selection has changed. Just clicking in a frame is enough to trigger it.)

P.

Votes

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
New Here ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

That could work in a general sense, but I'm afraid afterSelectionChanged

might be a bit too broad.

I specifically need to know if there is any altered or added text anywhere

in the document.

I'm aiming to set a boolean based on altered/added text, so if I listen for

more than just that (like any time a selection is altered, be it clicked,

moved, resized) then the accuracy of my script will be compromised.

Thanks for the suggestion though! I appreciate the help.

Votes

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
Community Expert ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

Maybe you could use the 'track changes' feature. It's a quick way of checking if any text was changed, though it won't tell you about formatting.

Votes

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
New Here ,
Nov 15, 2016 Nov 15, 2016

Copy link to clipboard

Copied

That's a good solution!

The only issue I'd face with that is that my users have direct control over whether or not the 'Track Changes' feature is enabled/disabled, so they could potentially compromise my script by turning it off. I don't think I'd be comfortable with a non-absolute script, so I'll have to go back to the drawing board to see if I can handle this without looking for text changes/additions.

Votes

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
Community Expert ,
Nov 16, 2016 Nov 16, 2016

Copy link to clipboard

Copied

Hi Brandon,

tracking changes of one or several text frames would be a huge task.
If the user should not change anything, I would provide a PDF as asset and control perhaps only if it is cropped, resized, rotated and positioned at the wrong place, hidden or is none-printing.

Regards,
Uwe

Votes

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
Explorer ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

I have created a simple script version of the Black Lining change tracking plugin that allows me to preview my tracked changes in live view by moving tracked canges (using InDesigns built in track change engine) into a conditional text context that highlights it yellow. I currently have to run an update script to show these highlights in layout. For my personal use this works fine but I want to allow a few other users to utilise this and they want to see the insertions "live". My thinking is that an event listener could automatically turn on the condition layer if text is inserted, moved, deleted or replaced. Is this possible? How would I enable this?

Votes

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
Guide ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

Hi,

 

Are you thinking about detecing every keystroke? 

 

P.

 

Votes

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
Explorer ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

Thinking about it … 

Not a programmer or I might have looked at developing a plug-in.

Votes

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
Explorer ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

Alternately, just targeting the corrent condition once typeing begins (should then automatically go to the correct condition) 

Votes

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
Guide ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

There are a few plugins that do this. I have one.

 

I suspect the overheads for using the the conditonal text route are high and would make a bad user experience.

 

P.

Votes

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
Guide ,
Apr 05, 2020 Apr 05, 2020

Copy link to clipboard

Copied

Hi,

 

Another thought. Are you planning on showing the deletes? Typically these would be show as a caret mark in the copy.

 

P.

 

Votes

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
Explorer ,
Apr 06, 2020 Apr 06, 2020

Copy link to clipboard

Copied

Yes, I know of three plugins for tracking changes – BlackLining, CtrlChanges and Kerntiff EditMarks.

BlackLining is very expensive, especially if you have a lot of operators needing to use it. The others are somewhat cheaper but still too pricy to purchase on behalf of the company's many freelancers (including me). My solution currently moves all moves and inserts into conditional text with different underline styles for insert and move. Also whenever a delete is found it inserts a custom character from a tiny font I created for this specific purpose. (Instead of BlackLining's caret it has a bold x below the baseline with a thin vertical bar indicating position in the text. The character has a zero width so it usually does not affect layout at all. Then when I accept changes (with a second script) it deletes all these custom deletion icons. Maybe if I create a menu for the scripts user can select an update option whenever they update any text the story will be updated.

 

I have lost work in the past because I cannot do blacklining on my own laptop when I am off site. That is why I developed my scripts to enable me to provide marked up proofs. An early variation of my system used double pipe symbols at a deletion point which was defined in my font as a ligature that resolved to my special icon. Then just typing the double pipe over selected text for deletion and having a grep style (which has to be included in every paragraph style in the document) that changed to the custom font and applied a colour to this. Insertions also required typing a double exclamation to begin and a double inverted exclamation to end the insert. Again grep took care of hiding the double exclamations and then set a yellow outline to the characters for highlight. My new scripts give a better looking result (almost identical to the BlackLining plugin) and is much easier to apply. Scripts also check that the correct contitions exist and any character styles needed are created. Only limitation is you have to run the update marks script every time you make a change or deletion. Hence my original comment on this thread. Some refinements I am still working on include a version system where you can view only changes made between certain date/times. I plan to  store a variable for each version that stores the start date/time. A new script will activate a new level and another will open a dialogue box that will allow a user to select which versions to display (defaulting for the most part to just the latest version). The highlight changes script will also need to be updated to check the version variable for the latest version parameters to use. This should be fairly trivial, just skip changes that outside the current date parameters.

 

Would anyone reading this thread be interested in seeing the (messy) state of my scripts at present? I would be willing to share in exchange for assistance with refinements and feedback on workability.

Votes

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
Guide ,
Apr 06, 2020 Apr 06, 2020

Copy link to clipboard

Copied

Have you seen this from CtrlChanges.

https://exchange.adobe.com/creativecloud.details.343.ctrlchanges-light.html

It is free.

 

Sounds like you are doing really well with this.  One problem you will discover, track change deletes are coaleseced, it might be difficult to implement your versions for deletes.

 

P.

 

Edited to say: I do not work for CtrlChanges, I work for Kerntiff EditMarks.

Votes

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
Explorer ,
Apr 06, 2020 Apr 06, 2020

Copy link to clipboard

Copied

The free CtrlChanges only displays changes. The markup does not export or print so it is not a solution for me.

Votes

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
Guide ,
Apr 06, 2020 Apr 06, 2020

Copy link to clipboard

Copied

LATEST

How about using it for the immediate screen draw. Then convert to your conditional text for print.

 

P.

 

Votes

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