Get selected workspace in Photoshop
Posted: Mon Jan 23, 2017 4:19 pm
I'm looking for a script to get the currently-selected workspace from Photoshop. If possible, I'd also like to get a list of available workspaces. This is for a plugin I'm building that can cycle through workspaces based on user input.
I already have the script to select a specific workspace by name, which I got from the ScriptListener plugin:
I already have the script to select a specific workspace by name, which I got from the ScriptListener plugin:
Code: Select all
var idslct = charIDToTypeID( "slct" );
var desc5 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref1 = new ActionReference();
var idworkspace = stringIDToTypeID( "workspace" );
ref1.putName( idworkspace, "Photography" ); // substitute "Photography" with any workspace name
desc5.putReference( idnull, ref1 );
executeAction( idslct, desc5, DialogModes.NO );