Copy link to clipboard
Copied
Is there a way to set up a keyboard shortcut or an existing modifier for the Group/Layer selection?
Copy link to clipboard
Copied
An Action can play the selection of a tool preset, but it may fail if the tool preset is set to "current tool only" and the move tool isn't selected. Also, the only keyboard shortcuts are Functin F-key based. So actions have limitiations.
Scripts offer more flexibility. There might be a way to directly script this with arcane AM code, however, I don't know about that.
What I do know is that you can create two named presets for the move tool, such as "Move Tool - Group" and
// Select 'Move Tool - Group' Preset
#target photoshop
(r = new ActionReference()).putClass(stringIDToTypeID('moveTool'));
(d = new ActionDescriptor()).putReference(stringIDToTypeID('target'), r);
executeAction(stringIDToTypeID('select'), d, DialogModes.NO);
selectMoveToolPreset("Move Tool - Group");
function selectMoveToolPreset(thePresetName) {
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putName( s2t( "toolPreset" ), thePresetName );
descriptor.putReference( s2t( "null" ), reference );
executeAction( s2t( "select" ), descriptor, DialogModes.NO );
}
And:
// Select 'Move Tool - Layer' Preset
#target photoshop
(r = new ActionReference()).putClass(stringIDToTypeID('moveTool'));
(d = new ActionDescriptor()).putReference(stringIDToTypeID('target'), r);
executeAction(stringIDToTypeID('select'), d, DialogModes.NO);
selectMoveToolPreset("Move Tool - Layer");
function selectMoveToolPreset(thePresetName) {
function s2t(s) {
return app.stringIDToTypeID(s);
}
var descriptor = new ActionDescriptor();
var reference = new ActionReference();
reference.putName( s2t( "toolPreset" ), thePresetName );
descriptor.putReference( s2t( "null" ), reference );
executeAction( s2t( "select" ), descriptor, DialogModes.NO );
}
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html
Copy link to clipboard
Copied
Thanks a lot. That is heavy code knowledge but I will try it.
Copy link to clipboard
Copied
Let me know how you go. After almost a month, I thought that this was a hit-and-run topic and that you wouldn't be back!
Copy link to clipboard
Copied
I tried this but my acute allergies to code flared up and I just decided to live with it the way it is. Sorry so slow in informing you.