Copy link to clipboard
Copied
So I have written my own HTML panel for personal use in Photoshop, but I can only get it to access .jsx scripts which are local to the directory of the panel's index.html file. What I would really like it to be able to do is actually call scripts which are located in Photoshop's scripts folder located at:
C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Scripts
(on Windows). This is because I want to create a panel that can access the SAME scripts that show up here:
As far as I understand it right now, HTML panels can only call .jsx scripts which are located in the:
C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\PanelNamel\jsx
folder.
Summary:
How can I get custom HTML Photoshop panels to call scripts from:
C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Scripts
as opposed to from here:
C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\PanelNamel\jsx
?
Copy link to clipboard
Copied
Have you tried using $.evalFile() or @include to access a jsx file outside the standard directory?
Copy link to clipboard
Copied
I have not. Unfortunately, there seems to be limited documentation on this stuff. Would you please be able to provide a short example of how either of those would work? Thank you very much.
Copy link to clipboard
Copied
You can try to create a symbolic link instead of the Scripts folder or jsx
after deleting the target folder (Scripts or jsx)
from the command line, call
mklink /d "C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Scripts" "C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\PanelNamel\jsx"
after removal Scripts folder
or
mklink /d "C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\PanelNamel\jsx" "C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Scripts"
after removal Scripts jsx folder.
Copy link to clipboard
Copied
I would say that $.evalFile() (passing an absolute path) is the easiest option, as Chuck has suggested.
If you're looking for HTML Panels help, please check out the Adobe CEP Forum here: Extensions / Add-ons Development – it has a resources section as well.
HTH,
Davide
Copy link to clipboard
Copied
I have no idea your CEP (or however it's called) recognizes single scripts that are nasted in location you linked to (so like Photoshop is able to do with) but you may give it a try and let me know:
File(Folder.commonFiles + '/Adobe/CEP/extensions/PanelNamel/jsx/Scripts').createAlias(Folder.startup + '/Presets/Scripts')