It is currently March 29th, 2024, 9:55 am

Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

General topics related to Rainmeter.
User avatar
goeway
Posts: 21
Joined: March 20th, 2019, 8:50 pm

Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

Post by goeway »

Code: Select all


[MSAudioPlugin]
Measure=Plugin
Plugin=Win7AudioPlugin
 
[MSTime]
Measure=Time
Format=%H.%M%S

[CalcDoit]
Measure=Calc
Formula=MSTime
IfCondition=#CURRENTSECTION#=23.3
IfTrueAction=[!CommandMeasure "MSAudioPlugin" "SetVolume 10"]

mak_kawa
Posts: 908
Joined: December 30th, 2015, 9:47 am

Re: Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

Post by mak_kawa »

Hi goeway

Nice idea! By the way, one trivial thing... the [CalcDoIt] measure is somewhat redundant and not neccesary?

Code: Select all

[MSTime]
Measure=Time
Format=%H.%M%S
IfCondition=#CURRENTSECTION#=23.3
IfTrueAction=[!CommandMeasure "MSAudioPlugin" "SetVolume 10"]
User avatar
goeway
Posts: 21
Joined: March 20th, 2019, 8:50 pm

Re: Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

Post by goeway »

mak_kawa wrote: December 27th, 2019, 11:52 pm Hi goeway

Nice idea! By the way, one trivial thing... the [CalcDoIt] measure is somewhat redundant and not neccesary?

Code: Select all

[MSTime]
Measure=Time
Format=%H.%M%S
IfCondition=#CURRENTSECTION#=23.3
IfTrueAction=[!CommandMeasure "MSAudioPlugin" "SetVolume 10"]
:thumbup: :thumbup: :thumbup:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

Post by balala »

I'd add an additional advice, related to the condition. I'd modify the posted IfCondition, this way: IfCondition=#CURRENTSECTION#>=23.3. The added > sign doesn't do anything in most cases, but in some circumstances it might become important. These cases might be one of the following:
  • The computer is put on sleeping at the given moment. Not absolutely impossible.
  • The computer is heavily loaded at the same moment.
In both cases the skin might jump over the moment given into the IfCondition option. In this cases with the condition wrote only with the equality, the IfTrueAction is not executed. If you modify the condition as I described above, the IfTrueAction is executed anytime after the moment given by the IfCondition.
Given that this little modification doesn't hurt, I recommend it, to avoid cases when the skin avoid executing the bangs used into the IfTruAction option.
User avatar
Cariboudjan
Posts: 264
Joined: May 12th, 2019, 8:55 am

Re: Schedule Auto Volume Adjustments for PC,Thank Rainmeter!

Post by Cariboudjan »

I would use

Code: Select all

IfCondition=(#CURRENTSECTION#>=23.3) || (#CURRENTSECTION#<=7.3)
IfTrueAction=[!CommandMeasure "MSAudioPlugin" "SetVolume 10"]
So that the action is triggered even if the PC is turned on sometime in the middle of the night.
Also allows an IfFalseAction to automatically increase the volume after 7:30am.

PS: Wouldn't this be easier to do with Event Viewer?

I'd also add

Code: Select all

IfConditionMode=1
and use

Code: Select all

UpdateDivider=60
So that it only asks "What time is it?" every 60 seconds, and the IfCondition is re-checked every 60 seconds. This would make sure the volume is set to 10 though fair-warning if you wanted to increase or decrease the volume in the night every 60 seconds it would change back to 10. I'd get pretty annoyed with that pretty quick.

Personally I think you're way better off just using Event Viewer for this.