Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

[CS5.5][JS] Delete character located before search result

$
0
0

Hi,

 

I have a small question.

 

I would like to delete all spaces before all text tagged with a specific character style.

 

Example: "Appel:[SPACE][BEGIN CHAR STYLE FRUIT]5 pieces[END CHAR STYLE FRUIT]

 

I would like to delete the space...

 

A piece of my code:

 

             app.findTextPreferences = NothingEnum.nothing;

             app.findTextPreferences.appliedCharacterStyle = "FRUIT"

 

              myResultsList = app.activeDocument.findText();                                                      

 

              for (var k =myResultsList.length-1; k > -1; k = k -1) {

 

                         // How do I delete the space before the result ?

 

               }

 

Does aynone have any idea?

 

Thanks

 

John


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>