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

Undefined is not an object script error

New Here ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

Shauna0D45_0-1614008835586.png

Hello Community,

I inherited the above but have little experience with scripts, I'm not sure why im getting the above error. 

I did try changing the scripts location from Favorites to Indesign but that ran the same error.

 

Shauna0D45_1-1614009374423.png

Any help would be greatly appreciated!

 

 

 

TOPICS
Scripting

Views

713

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

Community Expert , Feb 22, 2021 Feb 22, 2021

In the top left dropdown showing Extendscript Toolkit, select InDesign and then try

-Manan

Votes

Translate

Translate
Community Expert ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

Hi,

 

Do you have a document open? and has it been saved at least once?

 

Malcolm

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
New Here ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

I do and yes it has been saved.

I updated the pages and now it won't run.

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
Enthusiast ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

LATEST

myArray is missing "CW" and "TL" at their respective places.

You iterate through the for-loop 12 times, adding +12 in line 24 - that results in 24 entries you need to have in myArray – you only have 22.

That's one part which could be improved by using masterSpread.baseName which doesn't contain the spread prefix. So I would cut the array short at "L-TL" and then change line 24 to
myMaster.baseName instead of myArray[i+12]

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
Community Expert ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

In the top left dropdown showing Extendscript Toolkit, select InDesign and then try

-Manan

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