J
J
Julia2018-08-27 11:07:27
Adobe Photoshop
Julia, 2018-08-27 11:07:27

Photoshop script, what does it do?

Hello everyone :) I am doing photo retouching, the employer sent a letter to set up a connection between the admin panel and Photoshop. I just don't understand what this connection is for? What will this script do in my photoshop?
"Download the win-photoshop-save-all.zip archive
- Next, unpack the archive to any convenient location
- Files lxphd.bat, lxphu.bat and the lxcurl folder from the archive, move it to the current user folder (for example C:\Documents and Settings\Users \User1)
- Move the ListexSave.js and ListexSaveAll.js files to the ...\Presets\Scripts folder in the folder with Photoshop installed
- Edit the lxphd.bat file - there we indicate the full path to the Photoshop.exe executable file, in the line "SET photoshop ="
- Edit the lxphu.bat file - specify the UserId of the user from the admin panel in the "SET userid =" line
- run the reg_lxphd.reg file to make changes to the registry (preferably from the administrator)
After all these manipulations, restart Photoshop (if it was open) "

var re = /(?:\.([^.]+))?$/;
var exts = re.exec(activeDocument.fullName);
var ext = exts[exts.length - 1].toLowerCase();

var filename = (activeDocument.fullName + "").split("/");

if (ext == 'jpg') {
  var jpegOpts = new JPEGSaveOptions();
  jpegOpts.quality = 12;
  activeDocument.save(jpegOpts);
} else {
  activeDocument.save(new PNGSaveOptions());
}

$.setenv("FILENAME", filename[filename.length - 1]);
$.setenv("DDD", "0");
$.setenv("DDDFinish", "0");



app.system("cmd /c \"%USERPROFILE%/lxphu.bat\"");

alert("Uploaded! Check changes yourself, please.");
activeDocument.close();

Is it possible to do without it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2018-08-27
@Juli888

Have you tried asking the customer?
Judging by the names of the files, there will be some kind of export from the site or to the site (rather the second one). Those. you prepare materials, press a button - and everything is immediately uploaded to the site.
It's impossible to say more without code. But asking the customer is the right thing to do.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question