I'm looking for a javascriptor for photoshop. I need to create conditional actions according to the decimal ratio.  Thank you

I'm looking for a javascriptor for photoshop. I need to create conditional actions according to the decimal ratio.  Thank you

You can find us an if-else for this statement. You can put the reports what ever you want:

#target photoshop
var doc = activeDocument;
var ratio = parseFloat(doc.width/doc.height);
if(ratio<.25){//enter code here to run action
     }
if else(ratio<.5){//next code
     }
if else(ratio <1){more code}
else{more code}

Tags: Photoshop

Similar Questions

Maybe you are looking for