Copy link to clipboard
Copied
Hi friends, good night
Here's another hard question for experts:
I have dozens of images with the most varied sizes ranging from 8 to 20 cm wide by 9cm high and they will have to be added in 3 masks according to their respective size: How to automate this!
Maybe a script that can check the width of the document and perform a specific function!
Example:
If the active document has a width between 8 to 10 cm, execute function 1. "Mask 1"
/////////////
If the active document has a width of 12 to 14 cm, execute function 2. "Mask 2"
////////////
If the active document has a width between 19 to 20 cm, execute function 3. "Mask 3"
Grateful for the attention
var doc = activeDocument;
if(doc.width>=8&&doc.width<=10){
//code here
}
else if(doc.width>=12&&doc.width<=14){
//code here
}
else if(doc.width>=19&&doc.width<=20){
//code here
}
else{//code to capture all other widths
}
Copy link to clipboard
Copied
var doc = activeDocument;
if(doc.width>=8&&doc.width<=10){
//code here
}
else if(doc.width>=12&&doc.width<=14){
//code here
}
else if(doc.width>=19&&doc.width<=20){
//code here
}
else{//code to capture all other widths
}
Copy link to clipboard
Copied
In the simplest form, the //code here line could be replaced with:
app.doAction("My Action","My Action Set.atn")
Another alternative but similar option could be:
Siva's Photoshop Conditional Action
Copy link to clipboard
Copied
Stephen_A_Marsh this is too interesting! It will be very useful. Thanks for the tip.
Copy link to clipboard
Copied
Phenomenal it! How wonderful it worked perfectly well. Beautiful work.
Thank you one more timeChuck Uebele!
When I grow up I want to be just like you.