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

Export As Script 2023

New Here ,
Oct 30, 2023 Oct 30, 2023

Hello, 
I've been looking for Action to get to Export As dialog box quickly by just a press of a button instead of its native shortcut. Found this script online but it doesnt work with the PS 24.7.1 on a Mac.

app.runMenuItem(stringIDToTypeID("exportDocumentAsDialog"));
Please help!
 
Thank you
TOPICS
Actions and scripting , macOS
270
Translate
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
Adobe
Community Expert ,
Oct 30, 2023 Oct 30, 2023

AFAIK this isn't possible.

 

Export As (even in the most simple form as a menu item) isn't available to actions or scripts.

 

Sigh...

Translate
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
LEGEND ,
Jan 19, 2024 Jan 19, 2024

Create your action, Insert menu command, and select Export->Export As. It will show up as "Select <unknown> menu item" but will run in the action just fine. Just tested on PS 25.3.1 Mac.

Translate
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 ,
Jan 19, 2024 Jan 19, 2024
LATEST
quote

Create your action, Insert menu command, and select Export->Export As. It will show up as "Select <unknown> menu item" but will run in the action just fine. Just tested on PS 25.3.1 Mac.


By @Lumigraphics

 

The last time I looked at this it didn't work, it would come up with an error about an unknown menu command... But it does work now, so Adobe must have made an update somewhere along the line!

 

And it now also works in ExtendScript!

 

app.runMenuItem(stringIDToTypeID("exportDocumentAsDialog"));

 

Photoshop 2021 (22.5.9)

Translate
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
Engaged ,
Jan 19, 2024 Jan 19, 2024
await require("photoshop").core.performMenuCommand({commandID: 3443})

 

Caveats:

- Win command mappings may be different (I'm on a Mac, can't test a PC env)

- Works only if you're scripting in UXP (not ExtendScript/CEP)

 

Davide Barranca - PS developer and author
www.ps-scripting.com
Translate
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 ,
Jan 19, 2024 Jan 19, 2024

You can change the keyboard shortcut to a single key like one of the F keys

using Edit>Keyboard Shortcuts>Application Menus>File

 

exas.png

Translate
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
LEGEND ,
Jan 19, 2024 Jan 19, 2024

Even better.

Translate
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