Skip to main content
Inspiring
February 2, 2018
Answered

Logic in Actions?

  • February 2, 2018
  • 2 replies
  • 565 views

Please advise if it is possible to do a logical branch in an action, such as 'If this is true, do [sub]action A, otherwise do Action B', etc.

With thanks in advance,

jwc

    This topic has been closed for replies.
    Correct answer Stephen Marsh

    Actions don’t have logic, they are “linear”... however there are basic built in conditional actions which are useful, if rather limited.

    Add conditional actions in Photoshop

    Conditional logic is generally offered by scripting, and a script can play actions. One example of a “conditional action” (script) here:

    Siva's Photoshop Conditional Action: Siva's Photoshop Conditional Action

    http://tranberry.com/photoshop/photoshop_for_geeks/imageAspectConditional.jsx

    Script for conditional action in photoshop CS6

    2 replies

    JJMack
    Community Expert
    Community Expert
    February 2, 2018

    There are conditional steps that can be use to test a few document and layer conditions not many. You can also use scripts steps like File>Automate>Fit Image.   Fit image is a  Plug-in script that is an Adobe Photoshop Plug-in it will record the setting you used in its dialog recording an action step into the step in the action.  When the Action is played the recorded setting will be used and the Fit Image script will not display its dialog so that action can be batched.  You can also write you own Photoshop scripts and use them in action to add logic to actions. Included in my crafting Action package are a dozen or more script I wrote to be use in action.

    Crafting Actions Package UPDATED Aug 10, 2014 Added Conditional Action steps to Action Palette Tips.

    Contains

    Example

    Download

    JJMack
    Stephen Marsh
    Community Expert
    Stephen MarshCommunity ExpertCorrect answer
    Community Expert
    February 2, 2018

    Actions don’t have logic, they are “linear”... however there are basic built in conditional actions which are useful, if rather limited.

    Add conditional actions in Photoshop

    Conditional logic is generally offered by scripting, and a script can play actions. One example of a “conditional action” (script) here:

    Siva's Photoshop Conditional Action: Siva's Photoshop Conditional Action

    http://tranberry.com/photoshop/photoshop_for_geeks/imageAspectConditional.jsx

    Script for conditional action in photoshop CS6

    JackAuthor
    Inspiring
    February 2, 2018

    Perfect, thanks much.

    jwc