// imageAspectConditional.jsx // Copyright 2007 // Written by Jeffrey Tranberry // Photoshop for Geeks Version 1.0 /* Description: This script demonstrates how to run an action based on a condition */ // enable double clicking from the // Macintosh Finder or the Windows Explorer #target photoshop // Make Photoshop the frontmost application // in case we double clicked the file app.bringToFront(); /////////////////////////// // SET-UP // /////////////////////////// if (app.activeDocument.height > app.activeDocument.width) { // Run this action if the IF statement is true. doAction("My Great Action","Default Actions"); } else { // Run this action if the IF statement is false doAction("My Great Action2","Default Actions"); }