Copy link to clipboard
Copied
Hi,
I need to find enter with no text(idle) in a Layout.I have used the following code.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat ="\n";
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
var myFoundItems=new Array;
myFoundItems=app.activeDocument.findGrep();
var len=myFoundItems.length;
alert(len);
I don't know whether my approach is correct or not? Please suggest me.
Regards
Kumar
Try this:
app.findGrepPreferences.findWhat ="^\\r";
@+
Marc
[Edit: paragraph meta is \r and not \n]
Copy link to clipboard
Copied
hi Kumar,
you need to find "double enter" and then process second paragraph in each found result - but you need to process found items backward
or if you want to find empty TextFrames - you wont find them in this way - becuase empty TFs are empty no enter or any other characters
robin
www.adobescripts.co.uk
Copy link to clipboard
Copied
Try this:
app.findGrepPreferences.findWhat ="^\\r";
@+
Marc
[Edit: paragraph meta is \r and not \n]