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

How to add scripts to File->Scripts

Community Beginner ,
Mar 31, 2012 Mar 31, 2012

Copy link to clipboard

Copied

I plan to add scripts to Photoshop File->Scripts menu items. Or some other convenient mothed to invoke my script. How could I do it?

TOPICS
Actions and scripting

Views

102.8K

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

Community Expert , Apr 01, 2012 Apr 01, 2012

Just put the jsx-files into the Presets > Scripts-folder.

After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or (in CS4 and CS5) be used in a Configurator-Panel.

Configurator buttons can either refer to a Script or contain its code.

Votes

Translate

Translate
Adobe
Community Expert ,
Apr 01, 2012 Apr 01, 2012

Copy link to clipboard

Copied

Just put the jsx-files into the Presets > Scripts-folder.

After restarting Photoshop the Script should be available under File > Scripts and can be assigned a Keyboard Shortcut directly, recorded into an Action or (in CS4 and CS5) be used in a Configurator-Panel.

Configurator buttons can either refer to a Script or contain its code.

Votes

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 14, 2016 Feb 14, 2016

Copy link to clipboard

Copied

worked like a charm. Thank you

Votes

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 21, 2016 Feb 21, 2016

Copy link to clipboard

Copied

I have just started using photoshop cc 2015 and now am getting an

error 1302 No Such Element

Line 21

->var doc = activeDocument

Worked great when I was using PS CS3

Votes

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
Participant ,
Feb 22, 2016 Feb 22, 2016

Copy link to clipboard

Copied

It can happen when no image is opened in Photoshop.

Votes

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 ,
Nov 11, 2016 Nov 11, 2016

Copy link to clipboard

Copied

This may be a stupid question, but how do you download jsx files? Photoshop Tip by Stephen Di Donato - Dribbble this is the one I want

Votes

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
Community Expert ,
Nov 11, 2016 Nov 11, 2016

Copy link to clipboard

Copied

Right-click on the link, choose the option below and you will get the Save dialog.

Screen Shot 2016-11-11 at 10.02.28 AM.png

Screen Shot 2016-11-11 at 10.05.24 AM.png

That's the beauty of user to user forums, helpings others get to an answer fast so they can continue on.

Gene

Votes

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
Community Expert ,
Apr 01, 2012 Apr 01, 2012

Copy link to clipboard

Copied

If your on windows you can add a link(Windows Shortcut) to Adobe Photoshop Presets\script\ folder to your Phtoshop Scripts tree to link Photoshops script path with your script tree to keep your scripts sepreate from Adobe scripts.  Photoshop will includ your Scripts, Plug-ins Scripts and Help in it File>Scripts> List, File>Automate>List and Help>About Plug-ins>List is like adding an additional Plug-in path to Photoshop Preferences. 

JJMack

Votes

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
Explorer ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Hello, I'm trying what you said. Should the Windows Shortcut be inside the C:\Program Files\Adobe\Adobe Photoshop CC 2015\Presets\Scripts folder?

Thanks

David

Votes

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 ,
Aug 01, 2018 Aug 01, 2018

Copy link to clipboard

Copied

LATEST

yes

Votes

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
Contributor ,
Apr 02, 2012 Apr 02, 2012

Copy link to clipboard

Copied

If you're on Windows 7, you can drag the script file over your Photoshop icon on the taskbar to "pin" the script to the right-click menu for Photoshop.  Any time you would need to run it, just right-click the icon on the taskbar and select the script from the "Pin list".

Votes

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
Participant ,
Jun 10, 2015 Jun 10, 2015

Copy link to clipboard

Copied

Hi all,

I am on Windows 7. All my scripts are in the same folder (c:\Photoshop Scripts).

Every script begins as follow :

// MAC Finder or WINDOWS Explorer  double clic enabled

#target photoshop

app.bringToFront();

I launch my scripts with links created in a desktop folder. JSX extension is associated to Photoshop. Nothing else to do. The scripts open Photoshop. I never use any browser.

Excuse my poor English.

Votes

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
Explorer ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

Hello, please help! I'm trying to run a VBS script from within Photoshop! I know I should start the VBS script by a JSX script, but I can't find the right command for that! Thanks in advance,

David

Votes

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
Guide ,
Jan 23, 2017 Jan 23, 2017

Copy link to clipboard

Copied

var myvbs = new File ('/c/wherever/myvb.vbs');

myvbs.execute();

Votes

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
Explorer ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Thanks for the help. But it doesn't work. the jsx file executes itself, but then the vbs script is not launched.

Another question: if both scripts are in the same folder, is it necessary to write the full path of the vbs file inside the jsx code?

Thanks

G

Votes

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
Guide ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

It might be best to add some check to the code to make sure you have the path and filename correct...

var myvbs = new File ('/c/wherever/myvb.vbs');

if(myvbs.exists){

myvbs.execute();

}else{

    alert("vbs file does not exist!");

    }

You can use the javascript path, if both files are in the same folder...

var myvbs = new File($.filename.parent + "/myvb.vbs");

if(myvbs.exists){

myvbs.execute();

}else{

    alert("vbs file does not exist!");

    }

Another option would be to use cscript via app.system

app.system('cscript //Nologo d:\\vbsfiles\\device.vbs');

Votes

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
Explorer ,
Jan 24, 2017 Jan 24, 2017

Copy link to clipboard

Copied

Thanks a lot Merllin, you are a true magician!!

Your first code worked. The second code returned an error. I didn't try the 3d code.

I guess there was an error in the path I was using. This path seems strange by the way, but as long as it works it's OK

Votes

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