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?
1 Correct answer
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.
Explore related tutorials & articles
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.
Copy link to clipboard
Copied
worked like a charm. Thank you
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
Copy link to clipboard
Copied
It can happen when no image is opened in Photoshop.
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
Copy link to clipboard
Copied
Right-click on the link, choose the option below and you will get the Save dialog.
That's the beauty of user to user forums, helpings others get to an answer fast so they can continue on.
Gene
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.
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
Copy link to clipboard
Copied
yes
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".
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.
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
Copy link to clipboard
Copied
var myvbs = new File ('/c/wherever/myvb.vbs');
myvbs.execute();
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
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');
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

