It is currently April 27th, 2024, 4:56 pm

Win7AudioPlugin OnChangeAction

Get help with creating, editing & fixing problems with skins
User avatar
Nookz
Posts: 55
Joined: November 3rd, 2023, 7:22 pm

Win7AudioPlugin OnChangeAction

Post by Nookz »

Hello again World!
I have a question.

So far when using Win7AudioPlugin I was using

Code: Select all

OnChangeAction=[!Refresh]
The goal was to refresh the skin whenever a change is made in output device. This is because I think (I'm not sure?) when the output switches, the plugin doesn't automatically detects it.
So if I connect/disconnect my Bluetooth headset, the readings just stops where they are when it happens.

But I realised just now that it also refresh the skin every time there's a change in Windows volume.
So my question is, is there a way to use OnChangeAction, but only for the string value of a measure? I suspect there is not, so I'm also wondering what would be an alternative solution for what I'm trying to do?
User avatar
balala
Rainmeter Sage
Posts: 16177
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Win7AudioPlugin OnChangeAction

Post by balala »

Add a String measure, which gets the string value of the Win7Audio plugin measure. Add the OnChangeAction option to this one.
For instance if your Win7Audio plugin measure is [MeasureWin7Audio] (this measure already exists), add the following [MeasureWin7String] measure:

Code: Select all

[MeasureWin7Audio]
Measure=Plugin
Plugin=Win7AudioPlugin

[MeasureWin7String]
Measure=STRING
String=[MeasureWin7Audio]
OnChangeAction=[!Refresh]
DynamicVariables=1
User avatar
Nookz
Posts: 55
Joined: November 3rd, 2023, 7:22 pm

Re: Win7AudioPlugin OnChangeAction

Post by Nookz »

Ahh makes perfect sense.
I like easy solution like that even if they make me feel dumb for not thinking about them myself. :D

Thanks a lot balala!!
User avatar
balala
Rainmeter Sage
Posts: 16177
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Win7AudioPlugin OnChangeAction

Post by balala »

Nookz wrote: December 19th, 2023, 8:56 pm I like easy solution like that even if they make me feel dumb for not thinking about them myself.
Don't feel dumb. There is no reason to feel so. It happens to all of us not to realize the existence of some easy solution from time to time.
Glad to help.
User avatar
Yincognito
Rainmeter Sage
Posts: 7177
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Win7AudioPlugin OnChangeAction

Post by Yincognito »

Nookz wrote: December 19th, 2023, 8:24 pmThis is because I think (I'm not sure?) when the output switches, the plugin doesn't automatically detects it.
So if I connect/disconnect my Bluetooth headset, the readings just stops where they are when it happens.
I'm not using a bluetooth headset (this particularity in Rainmeter was actually why I didn't buy such a headset when replacing my old one a while ago), but a similar issue happens with AudioLevel too, even for a wired headset in my case. Just so you know.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth