Highlighted

Get the text location in Pgf by Keyword

New Here ,
Nov 03, 2019

Copy link to clipboard

Copied

Hi,

Help me in getting the text location of a keyword in a paragraph. Keyword may be name, place, etc.

I need to insert additional text after the keyword.  

I am not able to get the text location at end of keyword.

TOPICS
Scripting

Views

177

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

Get the text location in Pgf by Keyword

New Here ,
Nov 03, 2019

Copy link to clipboard

Copied

Hi,

Help me in getting the text location of a keyword in a paragraph. Keyword may be name, place, etc.

I need to insert additional text after the keyword.  

I am not able to get the text location at end of keyword.

TOPICS
Scripting

Views

178

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
Nov 03, 2019 0
Adobe Community Professional ,
Nov 04, 2019

Copy link to clipboard

Copied

Maybe I'm missing something here, but why not just do a search for the keyword and then replace it with the keyword and the additional text? If the Change field isn't sufficient, you can find the first instance of the keyword, add the additional text, then copy the whole thing and from then on search and replace using the By Pasting option.

 

ETA: Whoops, sorry. Just saw that you were looking for a scripting solution. I can't help with that.

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
Reply
Loading...
Nov 04, 2019 0
Mentor ,
Nov 05, 2019

Copy link to clipboard

Copied

This is a complicated task. Have you already located the keyword? If not, did you have a plan for how to do it? One way is with Search(), but it is not the only way. And a programmatic search is tricky.

 

I think we need more details. If you are starting from nothing, the best we can do is offer some pointers. We can't write the script for you, because it is not trivial. At least, speaking for myself.

 

Russ

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
Reply
Loading...
Nov 05, 2019 0