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

local PC path source code??

Explorer ,
Jul 04, 2019 Jul 04, 2019

Hi,

I'm trying to find some list of common paths I can use inside my scripts

as far as I get

app.preferencesFolder      --> Users/[Username]/AppData/Roaming/Adobe/Adobe Photoshop [version #]/Adobe Photoshop [version #] Settings

is there any similar way to get ?

Users/[Username]/AppData/Roaming/Adobe/Adobe Photoshop [version #]/Presets/Actions

and

C/Program Files/Adobe/Adobe Photoshop [version #]/Presets/Actions

Thanks!

TOPICS
Actions and scripting
1.7K
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
Explorer ,
Jul 04, 2019 Jul 04, 2019

better this one
as not all users have admin privileges

Users/[Username]/AppData/Roaming/Adobe/Adobe Photoshop [version #]/Presets/Actions

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 Expert ,
Jul 04, 2019 Jul 04, 2019

From the manual JavaScript-Tools-Guide-CC.pdf

I think you sould download the manual and read it.  You can also test if what you develop as a files full path  Path\FileName.ext exists

JJMack
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
Explorer ,
Jul 04, 2019 Jul 04, 2019

ok, thanks!
finally I decided to create custom folder in userdir

path="~/DDS_save/save_DDS_send.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
LEGEND ,
Jul 04, 2019 Jul 04, 2019

decodeURI(path + '/Presets/Actions')

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
Explorer ,
Jul 04, 2019 Jul 04, 2019

Hi Kukurykus

Thanks!

same solution for xml version?

yours example goes again to javascript, and Scripts folder is write protected for non-admin users ((

trying to find a solution for installing my script

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
LEGEND ,
Jul 04, 2019 Jul 04, 2019

If you are on Windows you can use VBscript to access Regisry to get currenctly assigned Photoshop path.

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 Expert ,
Jul 04, 2019 Jul 04, 2019

]

Kukurykus  wrote

If you are on Windows you can use VBscript to access Regisry to get currenctly assigned Photoshop path.

While that may be correct it dose not mean that is the path of the Photoshop that your script is running in.  I have 5 version of Photoshop installed on my system and I have both the 32Bit and 64bit CS6 version installed. There are 6 Photoshop.exe on my system.  Most Windows registry keys for Photoshop point to the  Current CC 2019 version not all.  The Default Photoshop version is CC 2019 however any of the six Photoshop may be running  and I link all Photoshop  Script Folder to my Scripts Tree.  It is very easy to get the running Photoshop Path as well as the running script path using javascript.

scriptPath= $.fileName.substr(0, $.fileName.lastIndexOf("/") + 1);

scriptName = $.fileName.substr($.fileName.lastIndexOf("/") + 1 ,);

alert("Running Photoshop = '" + app.path + "'\nScript Path = '" + scriptPath + "'\nScript File = '" + scriptName + "'");

JJMack
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
LEGEND ,
Jul 04, 2019 Jul 04, 2019

The solution is of course for last installed Ps version so that someone usually wants to use. VBscript was an example as alternative for Javascript K2@ said does not want to use to have path in XML file (that can be created by VBscript too).

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
Guide ,
Jul 04, 2019 Jul 04, 2019

You could use BridgeTalk on Windows & Mac

$.writeln(BridgeTalk.getTargets("-199").join("\n"));

$.writeln("-------");

$.writeln(app.version);

$.writeln("-------");

$.writeln(BridgeTalk.getSpecifier ("photoshop"));

$.writeln("-------");

$.writeln(BridgeTalk.appVersion);

$.writeln("-------");

$.writeln(BridgeTalk.getAppPath("photoshop"));

$.writeln("-------");

$.writeln(BridgeTalk.getDisplayName("photoshop"));

$.writeln("-------");

$.writeln(BridgeTalk.getTargets( null, "en_GB" ).join("\n"));

$.writeln("-------");

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
LEGEND ,
Jul 04, 2019 Jul 04, 2019

Yes, that's good solution, but it needs Extendscript while in reply No. 3 the author doesn't want it if I understand right?

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
Guide ,
Jul 04, 2019 Jul 04, 2019
LATEST

Sorry I was half asleep! now I will go back to sleep

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