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

#target problem

Explorer ,
Jan 16, 2019 Jan 16, 2019

When I run the following script from the toolkit (4.0.0.1)

#target indesign

alert("Hello");

I get the following error:

"Adobe Indesign CS6 (8.0) must be running to retrieve Object Model data. Do you want to launch Abobe Indesign CS6?"

I have ID 2018 open. (ME edition -- but that shouldn't make a difference)

Changing the target to indesign-13.1 gives me the error

"indesign-13.1" is undefined!

Any ideas?

TOPICS
Scripting
2.3K
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 , Jan 16, 2019 Jan 16, 2019

Hi akiva_atwood ,

try this string:

#target indesign-13.064

That InDesign CC 2018 is updated to version 13.1 is not important. The .064 part is indicating 64 bit.

For other information on versions installed or not, just exploit what's returned by this line of code running with the ESTK:

BridgeTalk.__diagnostics__

Regards,
Uwe

Translate
Community Expert ,
Jan 16, 2019 Jan 16, 2019

You need to comment the line #target indesign

This means that the script has to run in the script environment of InDesign. alert does not need InDesign to run. If you do use #target then it will launch the latest version of InDesign, unless of course you use the version of InDesign.

-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
Explorer ,
Jan 16, 2019 Jan 16, 2019

I know. I want to be able to run the script from the command line -- so I need the #target.

(the alert was just to test the #target)

My problem is that is DOESN'T. It wants to open CS6

And every time I open the toolkit now it gives me the same error

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 ,
Jan 16, 2019 Jan 16, 2019

Hi akiva_atwood ,

try this string:

#target indesign-13.064

That InDesign CC 2018 is updated to version 13.1 is not important. The .064 part is indicating 64 bit.

For other information on versions installed or not, just exploit what's returned by this line of code running with the ESTK:

BridgeTalk.__diagnostics__

Regards,
Uwe

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
Explorer ,
Jan 16, 2019 Jan 16, 2019

Hi Laubender​

The script runs.

Thanks

Akiva

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
Explorer ,
Jan 16, 2019 Jan 16, 2019

When I test it from the command line I get a dialog asking if I really want to run the script in ID -- is there some wy to turn that warning off?

Thanks

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 ,
Jan 16, 2019 Jan 16, 2019

Hm. This is a security warning. Don't think you can turn this off.

But maybe others have a solution for this?

Regards,
Uwe

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 ,
Jan 16, 2019 Jan 16, 2019

Hi akiva_atwood ,

what's your operating system version?

Are you using the -run flag or do you use the -cmd flag?

Could make a difference. See here:

How to execute an InDesign extendscript from command line? - Stack Overflow

EDIT: See the comments about the warning message there!

Regards,
Uwe

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
Explorer ,
Jan 16, 2019 Jan 16, 2019

Hi Laubender​

Thanks for the link. I'll experiment tomorrow.

I'm using OSx

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 ,
Jan 16, 2019 Jan 16, 2019

See here for trusted folder:

Running ExtendScript Toolkit in command line - Trusted location message

This should be a trusted folder:

Folder.myDocuments

See: Adobe InDesign CS6 (8.0) Object Model JS: Folder

Regards,
Uwe

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
Explorer ,
Jan 16, 2019 Jan 16, 2019

Thank you

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
Explorer ,
Jan 16, 2019 Jan 16, 2019
LATEST

You need a "Adobe Scripts" folder in the Folder.myDocuments location -- that's the trusted folder.

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
People's Champ ,
Jan 16, 2019 Jan 16, 2019

Good stuff Uwe! Did you see that documented anywhere?

Ariel

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