It is currently April 25th, 2024, 4:06 pm

Error 101 in Log (Not sure if Rainmeter-related)

Get help with creating, editing & fixing problems with skins
User avatar
Bananorpion
Posts: 40
Joined: April 16th, 2017, 8:35 pm

Error 101 in Log (Not sure if Rainmeter-related)

Post by Bananorpion »

Yop.

My skin runs fine, but having the same error in log, every couple seconds:
Error 101: Program still running: powershell.exe
I know where it happens ([MeasureBrightness]), I think know what happens (The skin updates before commands return termination signals, if they do at all), but I don't know a lot about powershell, or Windows programming itself, so I'm not sure where this could be fixed. Any idea?

Here's the relevant code :

Code: Select all

[Rainmeter]
OnUpdateAction=[!CommandMeasure MeasureBrightness "Run"]

[MeasureBrightness]
Measure=PLUGIN
Plugin=RunCommand
Program=powershell.exe
Parameter=Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorBrightness | findstr "Bright"
OutputType=ANSI
RegExpSubstitute=1
Substitute="CurrentBrightness : (\d+)#CRLF#":"\1"
FinishAction=[!SetOption MeasureBrightnessPercent Formula [MeasureBrightness]][!UpdateMeasure MeasureBrightnessPlus][!UpdateMeasure MeasureBrightnessMinus]
Attached is the full skin
(Will work on a Windows 10 laptop ONLY)
You do not have the required permissions to view the files attached to this post.
Last edited by Bananorpion on May 19th, 2017, 4:57 pm, edited 1 time in total.
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Error 101 in Log (Not sure if Rainmeter-related)

Post by balala »

In my opinion, the simplest solution would be to use instead of the posted plugin measure, a PluginBacklight plugin, which does the same thing, but it avoids such log error messages.
User avatar
Bananorpion
Posts: 40
Joined: April 16th, 2017, 8:35 pm

Re: Error 101 in Log (Not sure if Rainmeter-related)

Post by Bananorpion »

Fixed.
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Error 101 in Log (Not sure if Rainmeter-related)

Post by balala »

Bananorpion wrote:Fixed.
How?
User avatar
Bananorpion
Posts: 40
Joined: April 16th, 2017, 8:35 pm

Re: Error 101 in Log (Not sure if Rainmeter-related)

Post by Bananorpion »

Rookie mistake.

I used to have this:

Code: Select all

[Rainmeter]
OnUpdateAction=[!CommandMeasure MeasureBrightness "Run"]

[MeasureBrightness]
Measure=PLUGIN
Plugin=RunCommand
Program=powershell.exe
Parameter=Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorBrightness | findstr "Bright"
OutputType=ANSI
RegExpSubstitute=1
Substitute="CurrentBrightness : (\d+)#CRLF#":"\1"
= Command run on every update cycle

Now I have this:

Code: Select all

[Rainmeter]
OnRefreshAction=[!CommandMeasure MeasureBrightness "Run"]

[MeasureBrightness]
Measure=PLUGIN
Plugin=RunCommand
Program=powershell.exe
Parameter=Get-Ciminstance -Namespace root/WMI -ClassName WmiMonitorBrightness | findstr "Bright"
OutputType=ANSI
RegExpSubstitute=1
Substitute="CurrentBrightness : (\d+)#CRLF#":"\1"
FinishAction=[!CommandMeasure MeasureBrightness "Run"]
= Command run on refresh, and then every time the previous run command has ended.

Still a solution for people who don't want new plugins, but that's very basic.
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Error 101 in Log (Not sure if Rainmeter-related)

Post by balala »

Good point!