What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Script for JPGS to run Action


otsphotos

New Member
Messages
2
Likes
0
Hi, I'm running the second half of this script to determine the layout orientation and run a specific action according to image layout. It works, although I would like to run this script when Photoshop opens an image file that is a jpg only. If it opens a psd file, I would like the script not to run. The second half isn't working for me. I either left something out or included something wrong on the second script. Any thoughts are greatly appreciated.

if (/jpg$/i.test(activeDocument.name)) {
var doc = activeDocument;}

if(doc.width.value>doc.height.value){//Landscape
doAction("Landscape", "Photos");
}else{//Portrait
doAction("Portrait", "Photos");
}
 

Back
Top