Copy link to clipboard
Copied
I am working on a PSD file and want to save a certain result as a JPG in the same folder where the PSD is. I have been working with this function for years now, I have originally created it as an action with a keystroke… and suddenly it doesn't work anymore. It now saves the file in the folder where I saved the last file I was working on. I dont know why, and I cannot re-create it. I am desperate.
Please anybody … help
and thanx in advance already
I hadn’t tested the link in that thread, sorry it is broken.
Try this:
// 2020, use it at your own risk;
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
try {
var theName = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var theSuffix = myDocument.name.match(/.\D{3}$/i);
var thePath = myDocument.path;
}
catch (e) {
var theName = myDocument.name;
var thePath = "~/Desktop"
};
// jpg options;
var jpgopts = new JPEGSaveOptions();
jpgopts.embedProfile = true;
jpgopts.formatOptions =
...
Adobe broke all the links when the forum software was last updated.
If you know the topic title, you can search for the topic as the titles didn't break, just the link:
Action to save as Jpeg in origin image folder
Action to save as Jpeg in origin image folder
Copy link to clipboard
Copied
Please post a screenshot of the fully expanded Action in the Actions Panel.
If you recorded the Path in the original Action then it would naturally be used when running the Action.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
The Action includes the Path, so you may want to look into Scripting.
Copy link to clipboard
Copied
Hi,
I cannot make any sense from your last answer. When I click the link I get to someone who asked exactly my question. I scroll down the answers and arrive at this:
"Where actions have limitations, a script can usually achieve the desired result.
An action can record the location of an installed or browsed script and then execute the script as an action step.
Such a script can be found below, that way you only need one action, that will save into the source folder.
Action to save as Jpeg in origin image folder
Prepression: Downloading and Installing Adobe Scripts
And when I click the l“Action…“ linkI arrive at the Adobe Support Community start window
——————————
Goso
——————————
[ private informations removed by moderator for security reasons ]
Copy link to clipboard
Copied
now what do I do?
——————————
Goso
——————————
[ private informations removed by moderator for security reasons ]
Copy link to clipboard
Copied
I hadn’t tested the link in that thread, sorry it is broken.
Try this:
// 2020, use it at your own risk;
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
try {
var theName = myDocument.name.match(/(.*)\.[^\.]+$/)[1];
var theSuffix = myDocument.name.match(/.\D{3}$/i);
var thePath = myDocument.path;
}
catch (e) {
var theName = myDocument.name;
var thePath = "~/Desktop"
};
// jpg options;
var jpgopts = new JPEGSaveOptions();
jpgopts.embedProfile = true;
jpgopts.formatOptions = FormatOptions.STANDARDBASELINE;
jpgopts.matte = MatteType.NONE;
jpgopts.quality = 12;
myDocument.saveAs((new File(thePath+"/"+theName+".jpg")),jpgopts,true);
};
Copy link to clipboard
Copied
Adobe broke all the links when the forum software was last updated.
If you know the topic title, you can search for the topic as the titles didn't break, just the link:
Action to save as Jpeg in origin image folder
Action to save as Jpeg in origin image folder
Copy link to clipboard
Copied