Skip to main content
Participant
October 30, 2023
Question

Export As Script 2023

  • October 30, 2023
  • 3 replies
  • 449 views

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
This topic has been closed for replies.

3 replies

Jeff Arola
Community Expert
Community Expert
January 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

 

Legend
January 19, 2024

Even better.

Davide_Barranca12040269
Legend
January 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 authorwww.ps-scripting.com
Stephen Marsh
Community Expert
Community Expert
October 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...

Legend
January 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.

Stephen Marsh
Community Expert
Community Expert
January 19, 2024
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)