Sure there is, just not with the Process, AdvancedCPU (deprecated by now), PerfMon (deprecated by now, replaced by UsageMonitor) plugins, but by running the suited PowerShell command in a RunCommand measure:I am trying to create an Addon in Rainmeter that allows me to count how many instances are open of a certain program, in this specific case I would like to have a counter of the open instances of "msedge.exe" is there a way to do it?
Code:
[Variables]Process=Rainmeter[Rainmeter]Update=1000AccurateText=1DynamicWindowSize=1OnRefreshAction=[!CommandMeasure ProcessInstances "Run"]---Measures---[ProcessInstances]Measure=PluginPlugin=RunCommandProgram=PowerShellParameter=@(Get-Process -Name #Process# -ErrorAction 0).countState=HideOutputType=ANSIFinishAction=[!UpdateMeter *][!Redraw]DynamicVariables=1---Meters---[InstancesOfProcess]Meter=StringSolidColor=0,255,0,255AntiAlias=1MeasureName=ProcessInstancesText=Instances Of #Process# = %1LeftMouseUpAction=[!CommandMeasure ProcessInstances "Run"]DynamicVariables=1
References:
https://docs.rainmeter.net/manual/plugins/deprecated/
https://docs.rainmeter.net/manual/plugins/usagemonitor/
https://docs.rainmeter.net/manual/plugins/runcommand/
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-process?view=powershell-7.4
Statistics: Posted by Yincognito — Today, 5:50 pm