Executing keyboard shortcut functions

Discussion of Photoshop Scripting, Photoshop Actions and Photoshop Automation in General

Moderators: Tom, Kukurykus

dwoerner

Executing keyboard shortcut functions

Post by dwoerner »

There are many key board shortcuts and many I can see are closly related to script methods. What I don't see though is a way to execute a shortcut in a script. For example, to create a composite artlayer of all layers below the active layer I can use a shortcut, SHIFT-CTRL-ALT-E (PC). I do not know how to make photoshop do that from a script so I am wondering is there is a way to simply have the script execute the shortcut? This could be generalized to all shortcuts of course.

Have I missed a manual somewhere (I am a newbie)? Thanks.

Professional AI Audio Generation within Adobe Premiere Pro - Download Free Plugin here

Mike Hale

Executing keyboard shortcut functions

Post by Mike Hale »

There is a plug-in named scriptlistener that will record most menu or keyboard command to a log that then can be used in a script. Details are in the javascript guide.

Here is the merge visible into new layer code.

Code: Select allvar desc = new ActionDescriptor();
desc.putBoolean( charIDToTypeID('Dplc'), true );
executeAction( charIDToTypeID('MrgV'), desc, DialogModes.NO );
dwoerner

Executing keyboard shortcut functions

Post by dwoerner »

Thanks. I'll give it a try.