• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Run actions with script

New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Hi,

can someone please help me with a simple script;

I would like to run a script on multiple opened files (jpegs).

I am alredy working with actions, but there are two different actions, depending of the image orientation.

So the script should be simple, something like this:

- if opened image width>height - run action1

- if not, run action2

 

Actions alredy close images after execution so this script shod go through all opened files.

 

This would save me a lot of time..

Thanks!
B.

Views

186

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 28, 2024 May 28, 2024

@bojanp66203338 â€“ Photoshop offers a limited set of Conditional Actions and Landscape Orientation is one of the options. In this example image taken from another discussion, the content of the Landscape or Portrait action is for image size, but it could be anything:

 

2023-12-08_10-07-29.png

 

You can then use Batch to run the conditional action over all open documents.

 

A similar recent topic here:

 

https://community.adobe.com/t5/photoshop-ecosystem-ideas/ability-to-give-photoshop-two-sets-of-batch-resize-criteria-at-one-time/idi-p/14604996

...

Votes

Translate

Translate
Adobe
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

This is the Using the Community forum (which is the forum for issues using the forums).Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.

Scroll down here to see a list of the forums:
https://community.adobe.com/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Sorry.. My post should be in Photosop section, How to..

Thanks!
B.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

@bojanp66203338 â€“ Photoshop offers a limited set of Conditional Actions and Landscape Orientation is one of the options. In this example image taken from another discussion, the content of the Landscape or Portrait action is for image size, but it could be anything:

 

2023-12-08_10-07-29.png

 

You can then use Batch to run the conditional action over all open documents.

 

A similar recent topic here:

 

https://community.adobe.com/t5/photoshop-ecosystem-ideas/ability-to-give-photoshop-two-sets-of-batch...

 

You could create/use a script, however, the insert conditional action command will do the job.

 

EDIT: Here it is in legacy ExtendScript –

 

if (app.activeDocument.width > app.activeDocument.height)
	{
	app.doAction("Action1","Set1");
	}
else
	{
	app.doAction("Action2","Set1");
	}

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 29, 2024 May 29, 2024

Copy link to clipboard

Copied

LATEST

Hi, this is it, it works like a charm!

Thank you sooo much!
B:

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines