• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

hide photoshop sidebars while it applies the script

Explorer ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

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

TOPICS
Actions and scripting

Views

869

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Jul 10, 2021 Jul 10, 2021

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'))

 

Votes

Translate

Translate
Adobe
LEGEND ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

runMenuItem(stringIDToTypeID('screenModeFullScreen'))

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

Thank you 😍

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

The problem is that the function doesn't hide them, but toggles the state. If the palettes are hidden when the script is launched, then app.togglePalettes () will show them (that is, if @Aniquiladorz  wants to understand what the script is doing, it is enough to hide the panels before starting it). It seems to me that this function should be used only after evaluating the visibility of the panels.

The @Kukurykus method is devoid of this disadvantage

 

Also, in order to hide the operations performed by the script, you can use the app.suspendHistory (although this method is not without its drawbacks).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

"If the palettes are hidden when the script is launched, then app.togglePalettes () will show"

 

That is what I though also but I know  Photoshop does not always work like  I think it will.  Therefore; I gave it a try.   The toggle is like   Alt-Click toggle that  Photoshop has  for layers visibility.  In the Layer Palette. If you Alt+Click on a visible layer's eyeball icon all the other visible layers will be toggled off.  A second Alr+Click there will toggle the layer that were toggle off  back on.  Layer that were not visible  were not involved the toggling process.  

 

app.togglePalettes(); is like that toggle.   When a Script uses app.togglePalettes(); the First time All visible palettes are toggled off the second use toggle the Palettes that were togged off back on.   Its like a save and restore.... Like Photoshop's TAB Shortcut

 

You a great scripter still thing are not always like Adobe word it.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

quote

It seems to me that this function should be used only after evaluating the visibility of the panels.

 

#target photoshop
s2t = stringIDToTypeID;

(r = new ActionReference()).putProperty(s2t('property'), p = s2t('panelList'));
r.putEnumerated(s2t('application'), s2t('ordinal'), s2t('targetEnum'));
var panelList = executeActionGet(r).getList(s2t('panelList')),
    visible;
for (var i = 0; i < panelList.count; i++) {
    if (panelList.getObjectValue(i).getBoolean(s2t('visible'))) { visible = true; break; }
}

if (visible) app.togglePalettes()

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

I can not disagree with that. You do not want to use app.togglePalettes();  when no palette are visible unless you want to toggle Palettes back on.    The thing is you run  Scripts from  Photoshio UI via Shortcut, Scripts Menu, Photoshop Extension, From an Action in the Action Palette or F key shortcut.  I would think it would be a very rare case where a user would run a Script when there are no  photoshop panels  windows visible. 

 

I do not know javascript or how to code Photoshop Action Manager code I lack you knowledge and scripting skill.  I only hack at scripting Photoshop. So I just assume that some  Photoshop panel will be visible when my script execution starts.   I will use app.togglePalettes();  if my script will perform many Photoshop  steps in a loop. So Photoshop does not  need to update the dispaly to update amy visible panels so the script will perform better. And I will use app.togglePalettes();  again at the end of its execution where I restore the users Photoshop environment.   I can not say  making that assumption has messed my scripts up. For I normally have at least the Tools option bars  and tool bar window panels open when I run a script.  I edit in floating windows not in full screen mode.

 

If I had your knowledge and skills of course my scripts would be better than they are. Still the script I have create serve me well.

 

Users like you help me hack.  Thank you r-bin and others  you help the comunity so much.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

The speed of script execution is much higher in full screen mode than with all panels turned off.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

It's why I always use full screen mode. Toggling Palettes is useful for specified at the time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

That is good to know its faster in full screen mode.  I'm sure I may use that sometime.   However I like seeing my image(s) progress in the floating windows I have positioned switching to full jumps  the image view and document switching would be hard to follow to know what going on.

JJMack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

I saw this function you created, with it I am able to stop the script execution if someone presses the tab key?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

LATEST

Using actions you still can interact with Photoshop by Tabulator, but not while running script.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 09, 2021 Jul 09, 2021

Copy link to clipboard

Copied

if I use the option;

runMenuItem (stringIDToTypeID ('screenModeFullScreen'))

 

how to hide the confirmation dialog?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

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'))

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines