Copy link to clipboard
Copied
Hi all,
I'm not good at scripting, but I'm having trouble with my work and if someone can help me to make things more convenient then that's fine.
Vertical image- run script A
Horizontal image - run script B
Any help will be appreciated. Thanks very much!
This can be done without a script - just write a condition to the action and assign a command that it will execute for each case (if you need to run a script, you can easily write it into an action)
Copy link to clipboard
Copied
Insert the necessary code in the respective clause instead of running the Actions.
// 2012, use at your own risk;
#target photoshop
if (app.documents.length > 0) {
var myDocument = app.activeDocument;
if (myDocument.width > myDocument.height) {
app.doAction("Canvas landscape", "bfunk")
}
else {
app.doAction("Canvas portrait", "bfunk")
}
};
Copy link to clipboard
Copied
This can be done without a script - just write a condition to the action and assign a command that it will execute for each case (if you need to run a script, you can easily write it into an action)