Last active
January 15, 2025 09:15
-
-
Save theMikeD/45c39f812db48fd60406 to your computer and use it in GitHub Desktop.
Photoshopt script that does the same thing a ctrl-clicking a layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#target photoshop | |
// Mini-Script that does the same thing a ctrl-clicking a layer. | |
// Licensed under the GPL | |
ctrlLayerSelect(); | |
// does the same thing a ctrol-clicking a layer; | |
function ctrlLayerSelect() { | |
var id1 = charIDToTypeID( "setd" ); | |
var desc1 = new ActionDescriptor(); | |
var id2 = charIDToTypeID( "null" ); | |
var ref1 = new ActionReference(); | |
var id3 = charIDToTypeID( "Chnl" ); | |
var id4 = charIDToTypeID( "fsel" ); | |
ref1.putProperty( id3, id4 ); | |
desc1.putReference( id2, ref1 ); | |
var id5 = charIDToTypeID( "T " ); | |
var ref2 = new ActionReference(); | |
var id6 = charIDToTypeID( "Chnl" ); | |
var id7 = charIDToTypeID( "Chnl" ); | |
var id8 = charIDToTypeID( "Trsp" ); | |
ref2.putEnumerated( id6, id7, id8 ); | |
desc1.putReference( id5, ref2 ); | |
executeAction( id1, desc1, DialogModes.NO ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can you select a specific layer with this and not just the active layer?