Shortcut Keys - Close ALL minimised apps

  • Thread starter Thread starter Stan Smith
  • Start date Start date
S

Stan Smith

I have a number of operators who "open documents/apps/websites" and simply
minimise them on the desktop. As a consequence the taskbar becomes crowded
to the point of not being able to open more.
Is there any key combination/shortcut that allows me to Close All minimised
at once rather than having to highlight, open and close each of those
icons?????
Have done a web search but although there are loads of shortcuts there do
not seem any for the particular problem.

Many thanks

Stan
 
Stan said:
I have a number of operators who "open documents/apps/websites" and simply
minimise them on the desktop. As a consequence the taskbar becomes crowded
to the point of not being able to open more.
Is there any key combination/shortcut that allows me to Close All minimised
at once rather than having to highlight, open and close each of those
icons?????
Have done a web search but although there are loads of shortcuts there do
not seem any for the particular problem.
Hi

Nothing builtin for this I'm afraid, but you can script this.


Below is a VBScript that parses the output from the free command line
utility CMDOW to detect if the application is minimized or not, and
if minimized, uses CMDOW to close the window.

CMDOW Commandline Window Utility
http://www.commandline.co.uk/cmdow/index.html

You need to edit the path in the variable sCmdNow to point to
where cmdow.exe is to be found.


'--------------------8<----------------------
Option Explicit

Dim sCmdNow, aCmdNowLog, i, aLine, oShell

' path to the CMDOW Commandline Window Utility
' found at http://www.commandline.co.uk/cmdow/index.html
sCmdNow = "F:\tools\cmdow\cmdow.exe"

Set oShell = CreateObject("Wscript.Shell")

aCmdNowLog = Split(GetCmdNowStatus, vbCrLf)

For i = 0 To UBound(aCmdNowLog)
aLine = Split(aCmdNowLog(i))
If Ubound(aLine) > 2 Then
If LCase(aLine(3)) = "min" Then
' close the window feeding cmdow with the handle to the window
oShell.Run """" & sCmdNow & """ " & aLine(0) & " /CLS", 0, True
End If
End If
Next


Function GetCmdNowStatus

Const OpenAsASCII = 0
Const FailIfNotExist = 0
Const ForReading = 1

Dim oFSO, sCmdNowLog, fCmdNowLog, sContent


Set oFSO = CreateObject("Scripting.FileSystemObject")

sCmdNowLog = oFSO.GetSpecialFolder(2).ShortPath & "\cmdnow.log"

oShell.Run "%comspec% /c """ & sCmdNow & """ /t >" & sCmdNowLog, 0, True

Set fCmdNowLog = oFSO.OpenTextFile(sCmdNowLog, _
ForReading, FailIfNotExist, OpenAsASCII)

sContent = fCmdNowLog.Readall
fCmdNowLog.Close
oFSO.DeleteFile sCmdNowLog

' remove all double spaces (easier to use Split later on)
Do Until InStr(sContent, " ") = 0
sContent = Replace(sContent, " ", " ")
Loop
GetCmdNowStatus = sContent
End Function
'--------------------8<----------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top