Using variables in actions?

AC
Posted By
Arch_Carrier
Nov 11, 2003
Views
475
Replies
5
Status
Closed
Is it possible to include variables or some rudimentary programming in PS actions? I’m using version 7.0 and I’d like to make an action like this:
if(image height > 250px)
make image height 200
else make image height 150

How to Master Sharpening in Photoshop

Give your photos a professional finish with sharpening in Photoshop. Learn to enhance details, create contrast, and prepare your images for print, web, and social media.

DM
dave_milbut
Nov 11, 2003
Is it possible to include variables or some rudimentary programming in PS actions? I’m using version 7.0

no. but ps CS (actually imageready cs) includes exactly what you’re looking for.
TM
Trevor_Morris
Nov 11, 2003
Scripting might also be an alternative for you. The plug-in (v1.2a) is available for PS7.0.1. See the link off the main page of the Photoshop forum.
D
DavidMadison
Nov 11, 2003
Is the scripting plugin necessary for scripting use with PS CS?
TM
Trevor_Morris
Nov 11, 2003
No, a newer version is installed by default (much revised with better documentation) – aptly named ScriptingSupport 8.0.
HL
hanford_lemoore
Nov 12, 2003
Arch,

Here’s a script I wrote for Photoshop 7.0 It checks the image width and height, and branches to 2 different actions depending on which one’s bigger. I’m sure you could modify it for your own needs:

<http://www.hanfordlemoore.com/photoshop/index.htm>

The interesting bit with this script is that you can do all your work in actions (so it’s easy to change) but just use this little script to decide which action to run.

~Hanford

MacBook Pro 16” Mockups 🔥

– in 4 materials (clay versions included)

– 12 scenes

– 48 MacBook Pro 16″ mockups

– 6000 x 4500 px

Related Discussion Topics

Nice and short text about related topics in discussion sections