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

Windows - All documents minimised with Photoshop

Engaged ,
Sep 20, 2022 Sep 20, 2022

Copy link to clipboard

Copied

More often than not I will have ALT-TABbed away from Photoshop to the desktop (or maybe the Bahamas), but on my return all previous Photoshop files that I was working on will have been minimised. - This can be quite annoying, especially, if you have several open. 

 

So...I wondered if a script could fix it - just looping over each document and setting it to the active document. And funnily enough, it fixes the problem

 

I'm sharing it here, mainly for future reference for myself... and anyone else who encounters the same thing:

 

// Brings all the minimized documents to the fore
unminimize();

function unminimize()
{
  if (documents.length == 0) return;
  for (var i = 0; i < documents.length; i++)
  {
    app.activeDocument = documents[i];
  }
}

 

 

TOPICS
Actions and scripting , Windows

Views

190

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
Adobe
Community Expert ,
Sep 20, 2022 Sep 20, 2022

Copy link to clipboard

Copied

Thanks for sharing! Are the windows floating or tabbed?

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
Engaged ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

Floaty! 

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 ,
Sep 21, 2022 Sep 21, 2022

Copy link to clipboard

Copied

I have only tested on the Mac which works a little different, however, the end result should be the same in Windows:

 

// Maximise all minimised documents
if (app.documents.length) {
    app.runMenuItem(stringIDToTypeID('consolidateAllTabs'));
    app.runMenuItem(stringIDToTypeID('floatAllWindows'));
} else {
    //alert("No docs open!");
}

 

The original SL code that I extracted the menu item command from:

 

if (app.documents.length) {
var idselect = stringIDToTypeID( "select" );
    var desc20 = new ActionDescriptor();
    var idnull = stringIDToTypeID( "null" );
        var ref10 = new ActionReference();
        var idmenuItemClass = stringIDToTypeID( "menuItemClass" );
        var idmenuItemType = stringIDToTypeID( "menuItemType" );
        var idconsolidateAllTabs = stringIDToTypeID( "consolidateAllTabs" );
        ref10.putEnumerated( idmenuItemClass, idmenuItemType, idconsolidateAllTabs );
    desc20.putReference( idnull, ref10 );
executeAction(idselect, desc20, DialogModes.NO);

var idselect = stringIDToTypeID( "select" );
    var desc193 = new ActionDescriptor();
    var idnull = stringIDToTypeID( "null" );
        var ref12 = new ActionReference();
        var idmenuItemClass = stringIDToTypeID( "menuItemClass" );
        var idmenuItemType = stringIDToTypeID( "menuItemType" );
        var idfloatAllWindows = stringIDToTypeID( "floatAllWindows" );
        ref12.putEnumerated( idmenuItemClass, idmenuItemType, idfloatAllWindows );
    desc193.putReference( idnull, ref12 );
executeAction(idselect, desc193, DialogModes.NO);
} else {
    //alert("No docs open!");
}

 

Should be faster as it doesn't have to loop over the files.

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
Engaged ,
Jan 20, 2023 Jan 20, 2023

Copy link to clipboard

Copied

LATEST

Remind me to look into windows that are duplicated. - ie New window for (Window > Arrange > new window for doc XYZ) As those aren't covered int he same way. 

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