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

85

Likes

translate

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

Adobe Community Professional , Feb 22, 2021 Feb 22, 2021
In the top left dropdown showing Extendscript Toolkit, select InDesign and then try -Manan

Likes

translate

Translate

Translate
Adobe Community Professional ,
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

Likes

translate

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.

Likes

translate

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

Copy link to clipboard

Copied

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]

Likes

translate

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
Adobe Community Professional ,
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

Likes

translate

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