Find/Replace limited to a text selection or the active story! …


hi all,

 

i can't find syntax limit research! 

 

placing cursor in story or selecting story text frame:

 

var myselectedcontent = app.selection[0].parentstory.contents; 

 

… or selecting text:

 

var myselectedcontent = app.selection[0].contents; 

 

… after!? …

 

app.findgreppreferences = app.changegreppreferences = null;   app.findgreppreferences.findwhat = "……"; …… 

 

thanks in advance!

 

(^/)

it's easy if know how! 4 lines of scripting, , 'a's in selection only changed 'b's!

 

screen shot 2016-10-02 @ 9.24.11 pm.png



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Illustrator CS6 Ocurrío un error E/S en el archivo.

Why is os_ViewContainer running?

Animate - problem with duplicating scripts after loop