Skip to main content
Known Participant
July 9, 2021
Answered

hide photoshop sidebars while it applies the script

  • July 9, 2021
  • 2 replies
  • 1876 views

Hello everyone, everything good?

 

I found a script on the internet that when executed it hides the photoshop sidebars, with what appears to be a simple (tab) on the keyboard,

 

The purpose of hiding the bars is not to show what he is doing, Does anyone know how I create this "hide" with a script?

 

I've tried it but neither the photoshop actions nor the scriptlistener seem to work.

does anyone know how to hide the sidebars via script?Screen Recording 2021-07-09 at 01.01.24.09 PM

This topic has been closed for replies.
Correct answer Kukurykus

You can also

 

var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("menuItemClass"), stringIDToTypeID("menuItemType"), stringIDToTypeID("screenModeFullScreen"));
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);

 

Note. the command is not available if there is no open document. This is a big disadvantage.


I pasted the same code originally, but a second later I though it's too complex for someone without scripting abilities, so I changed it to a more understable version.

 

I guess user wants it for open documents only but for no open it's still easy:

 

documents.length && (displayDialogs = DialogModes.NO)
&& runMenuItem(stringIDToTypeID('screenModeFullScreen'))

 

2 replies

Known Participant
July 10, 2021

if I use the option;

runMenuItem (stringIDToTypeID ('screenModeFullScreen'))

 

how to hide the confirmation dialog?

Kukurykus
Brainiac
July 10, 2021

When for the first time this dialog appears check the box in left bottom corner to "don't show it again"

 

btw did you unmark correct solution because this dialog popped up?

 

To avoid the dialog completely use this code over previous one:

 

displayDialogs = DialogModes.NO

 

Brainiac
July 10, 2021

You can also

 

var d = new ActionDescriptor();
var r = new ActionReference();
r.putEnumerated(stringIDToTypeID("menuItemClass"), stringIDToTypeID("menuItemType"), stringIDToTypeID("screenModeFullScreen"));
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);

 

Note. the command is not available if there is no open document. This is a big disadvantage.

Kukurykus
Brainiac
July 9, 2021
runMenuItem(stringIDToTypeID('screenModeFullScreen'))
Known Participant
July 9, 2021

Thank you 😍

JJMack
Community Expert
July 9, 2021

You can toggle the palettes  instead of switching to full screen as long as Photoshop does not have update palettes content for display performance of the script will improve.

 

app.togglePalettes();

JJMack