I don't have exact syntax at hand but paragraphs have a findGrep method. So I guess you should write something like
set result to find grep
again, teh synatx is up to you but you get the idea. Besides what do you mean by "named as a layer in my source inDesign Document"?
It's named as an element under on a layer of the document.
I use that name to find elements to change fonts, etc. Just can't find the way to limit the search and replace to that text frame using that name.
headed down this path:
tell application "Adobe InDesign CS5.5"
set myDoc to active document
set Text_Frame to the text frame "PH"
set find text preferences to nothing
set change text preferences to nothing
set find what of find text preferences to "~"
set change to of change text preferences to " "
set myFoundItems to change text
still not working
Ok, you may need to tweak this snippet a bit. Right now, it will only apply changes to so names "foo" text frames.
tell application "Adobe InDesign CS5.5" set find text preferences to nothing set change text preferences to nothing set find what of find text preferences to "~" set change to of change text preferences to " " tell active document set tfs to all page items repeat with i from 1 to count of tfs set tf to item i of tfs if name of tf = "foo" then change text of tf end if end repeat end tell end tell