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

Error to execute the script through command prompt

Community Beginner ,
Mar 13, 2009 Mar 13, 2009
I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.

cscript D:\JS\Test.js
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.

Thanks,
Prabudass
TOPICS
Actions and scripting
1.0K
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
Adobe
Guru ,
Mar 13, 2009 Mar 13, 2009
You need to associate the .jx extension with Photoshop or change the ext to .jsx
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 Beginner ,
Mar 14, 2009 Mar 14, 2009
I need to run javascript(.js) for "photoshop cs". Could you please advice me and also kindly provide me any samples.
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
Guru ,
Mar 14, 2009 Mar 14, 2009
I haven't use CS for quite some time and file associations may not work with the command prompt.

You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'

If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967
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 Beginner ,
Mar 14, 2009 Mar 14, 2009
Could you please advice me how to create a droplet?
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
Guru ,
Mar 14, 2009 Mar 14, 2009
Choose File-Automate-Create Droplet. From the dialog choose the action that runs your script. For most scripts you can leave all the play options unchecked. If you script doesn't save the document you can set the destination options if you like.
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 Beginner ,
Mar 16, 2009 Mar 16, 2009
LATEST
Thanks for your help.
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