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

Reference Script from HTML Panel

Engaged ,
Nov 05, 2017 Nov 05, 2017

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:

HmnPft-BRSmRpg-ffs_JQg.png

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

?

TOPICS
Actions and scripting

Views

1.5K

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
Adobe
Community Expert ,
Nov 05, 2017 Nov 05, 2017

Copy link to clipboard

Copied

Have you tried using $.evalFile() or @include to access a jsx file outside the standard directory?

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
Engaged ,
Nov 05, 2017 Nov 05, 2017

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.

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
People's Champ ,
Nov 06, 2017 Nov 06, 2017

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.

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
Engaged ,
Nov 06, 2017 Nov 06, 2017

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

Davide Barranca - PS developer and author
www.ps-scripting.com

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
LEGEND ,
Mar 17, 2018 Mar 17, 2018

Copy link to clipboard

Copied

LATEST

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')

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