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

How to define .everyItem().getElements() ?

Contributor ,
Jun 26, 2019 Jun 26, 2019

Hi experts,

my script like this:

var myDocs = app.activeDocument; 

var mMasters = myDocs.masterSpreads.everyItem().getElements(); 

var cObjectsTextFrame = mMasters.textFrames.everyItem().getElements(); 

if (!cObjectsTextFrame.contents || !cObjectsTextFrame.contents.match(/\S/) ) cObjectsTextFrame.remove();

not working on

.everyItem().getElements()

could some one please tell me how to define .everyItem().getElements()

thanks

regard

John

TOPICS
Scripting
271
Translate
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
Community Expert ,
Jun 26, 2019 Jun 26, 2019
LATEST

Hi,

It is easier to use it all in one line , if possible,

var myTextFrames = myDocs.masterSpreads.everyItem().textFrames.everyItem().getElements();

After that you need to loop through the myTextFrames as this will be an array of all the items that where found.

The main advantage of everyItem is that you can simplify your loops (normally you can reduce it to one loop).

Regards

Malcolm

Translate
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