There might be a way using the WMIC tool in Windows, but not sure what that would look like. I don't think the Registry is a good way to go, how do you "count" them?
I just created a quick and dirty addon in AutoIt that can pretty easily do it using RunCommand:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[Variables]
SecondsToCheck=5
[MeasureTimer]
Measure=Calc
Formula=(MeasureTimer % 2 ) + 1
UpdateDivider=(#SecondsToCheck# / 2)
IfCondition=MeasureTimer=1
IfTrueAction=[!CommandMeasure MeasureCountWindows "Run"]
[MeasureCountWindows]
Measure=Plugin
Plugin=RunCommand
OutputType=ANSI
Parameter="#@#Addons\CountExplorerWindows.exe"
FinishAction=[!SetOption MeterCount Hidden "0"]
RegExpSubstitute=1
Substitute="<folders>(.*)</folders>":"\1"
[MeterCount]
Meter=String
MeasureName=MeasureCountWindows
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Hidden=1
Text=%1 Explorer windows open
1.png
CountExplorerWindows_1.0.rmskin
Source is included in the .rmskin.
Code: Select all
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Change2CUI=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#NoTrayIcon
#include <Array.au3>
Local $aWinList = WinList("[CLASS:CabinetWClass]")
ConsoleWrite("<folders>" & $aWinList[0][0] & "</folders>")
The process name "explorer.exe" doesn't help a bit, Windows has just scads of those running all the time, doing all kinds of things in addition to just "file manager". However the window "class" of "CabinetWClass" is used by and reserved to folders open in Windows Explorer, so counting those will get you there.
You do not have the required permissions to view the files attached to this post.