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

Undefined is not an object script error

New Here ,
Feb 22, 2021 Feb 22, 2021

Shauna0D45_0-1614008835586.pngexpand image

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.pngexpand image

Any help would be greatly appreciated!

 

 

 

TOPICS
Scripting
1.1K
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

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

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

Hi,

 

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

 

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

I do and yes it has been saved.

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

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

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

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

-Manan

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