Last active
May 31, 2020 04:00
-
-
Save theMikeD/c8b82084914a55590141 to your computer and use it in GitHub Desktop.
Photoshop script to call one of two different actions depending on the aspect of the image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target photoshop | |
// Mini-Script to call one of two different actions depending on the aspect of the image. | |
// This one requires editing by the end user. | |
// (c) Mike Dickson www.photoshoptools.ca | |
// Licensed under the GPL | |
docRef = activeDocument; | |
rulerUnits = app.preferences.rulerUnits; | |
app.preferences.rulerUnits = Units.PIXELS; | |
// If this is a landscape picture... | |
if ( docRef.height.value < docRef.width.value ) { | |
// EDIT HERE | |
app.doAction("YOUR LANDSCAPE ACTION NAME", "YOUR ACTION SET"); | |
} else { | |
// EDIT HERE | |
app.doAction("YOUR PORTRAIT ACTION NAME", "YOUR ACTION SET"); | |
} | |
app.preferences.rulerUnits = rulerUnits; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment