• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

[cs3][JS]Find Enter with no text in Layout

Community Beginner ,
Oct 21, 2009 Oct 21, 2009

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

TOPICS
Scripting

Views

493

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
community guidelines

correct answers 1 Correct answer

Guide , Oct 21, 2009 Oct 21, 2009

Try this:

app.findGrepPreferences.findWhat ="^\\r";

@+

Marc

[Edit: paragraph meta is \r and not \n]

Votes

Translate

Translate
Community Expert ,
Oct 21, 2009 Oct 21, 2009

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

Votes

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
community guidelines
Guide ,
Oct 21, 2009 Oct 21, 2009

Copy link to clipboard

Copied

LATEST

Try this:

app.findGrepPreferences.findWhat ="^\\r";

@+

Marc

[Edit: paragraph meta is \r and not \n]

Votes

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
community guidelines