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

Scripting - #target directive failed

New Here ,
Nov 29, 2019 Nov 29, 2019

Hi,

The weird thing about the day 

A double click on the file test.jsx with the following content, run fine, InDesign start and a popup window appears :

 

#target indesign
alert("Hello InDesign");

 

 The following script fails :

 

#target photoshop
alert("Hello Photoshop");

 

 with the followinf error message :

 The target "photoshop" is unknown. would you like to open the file to change it ?

(translated from french)

And if I run the script from the Extendscript Toolkit editor, I get :

"photoshop" is undefined!

Strange. Any idea why this doesn't work anymore?

Thanks

Windows 7, Photoshop 21.0.1, 

 

TOPICS
Actions and scripting
2.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

People's Champ , Nov 29, 2019 Nov 29, 2019
I do not use these directives and usually delete the Startup Scripts CS6 (CC) folder.

What version of ExtendScript Toolkit?
If version 3.8.0.12 (CS6) is assigned to the jsx extension, then it doesn’t work for me either.
If launch 4.0.0.1 (CC) is assigned to jsx, then photoshop 2020 starts wonderfully and the script works.
 
Translate
Adobe
People's Champ ,
Nov 29, 2019 Nov 29, 2019
I do not use these directives and usually delete the Startup Scripts CS6 (CC) folder.

What version of ExtendScript Toolkit?
If version 3.8.0.12 (CS6) is assigned to the jsx extension, then it doesn’t work for me either.
If launch 4.0.0.1 (CC) is assigned to jsx, then photoshop 2020 starts wonderfully and the script works.
 
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 ,
Dec 02, 2019 Dec 02, 2019

That was my problem. I hadn't noticed that it was the wrong version of ExtendScript Toolkit starting.

 

Thank you very much !

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 ,
Nov 29, 2019 Nov 29, 2019

There are specific photoshop versions you can Target when using extendScript Toolkit.  Ther are sever versions of extendScript.   I do not use any excepr for  their object model viewer

image.pngexpand image

image.pngexpand image

image.pngexpand image

image.pngexpand image

With extendscript CC if I just use #target photoshop without the -number string if Photoshop is not running it will want tp launch Photoshop 2020  -140.064. I CS6 is running it will still want to launch Photoshop 2020 but will not be able to on my Windows system.  Only one version of Photoshop can be up and running on Windows.

image.pngexpand image

image.pngexpand image

If I close CS6 Photoshop will not then start automatically

image.pngexpand image

However, if I then start Photoshop 2020 the script will run.

image.pngexpand image

JJMack
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 ,
Dec 02, 2019 Dec 02, 2019
LATEST

Thank you very much for this clarification.

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