It is currently June 28th, 2024, 3:58 am

[!Refreshapp] when skin loaded?

Get help with creating, editing & fixing problems with skins
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

Ok, I'm stuck again! :rofl:

I can't figure out why the IfMatch doesn't change the displayed MicIcon. Mute is working and is displaying a String in the About/Skins window of 0 or 1. I have tried both IfMatch and IfCondition, but it won't work.

Code: Select all

[mRunMicMute]
Measure=Plugin
Plugin=RunCommand
Parameter=#CURRENTPATH#svcl.exe /stdout /getmute "#Mic#"
State=Hide
Timeout=250
OutputType=ANSI
OutputFile=#CURRENTPATH#SoundValue.txt
FinishAction=[!SetVariable MicMute "[mRunMicMute]"]
UpdateDivider=-1

; "0":"UnMuted","1":"Muted"
IfMatch=1
IfMatchAction=[!SetOption MicIcon Text "[\xEC54]"][!SetOption MicTest FontColor "#Red#"] [!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MicIcon Text "[\xE720]"][!SetOption MicTest FontColor "#Green#"] [!UpdateMeter *][!Redraw]
The colour change doesn't work either, but I know why. At Present the skin uses the same icon for both Line and Mic. That will change soon so each will have it's own icon. But why it won't change the icon when it does change colour when Mic connect/disconnect, I just don't know.

Still can't get the bar to respond to current volume setting either!

Code: Select all

[sBar]
BarOrientation=Horizontal
BarColor=#Yellow#
SolidColor=#White60#
DynamicVariables=1
W=150
H=1

[SetMicVolBar]
Meter=Bar
MeasureName=mRunMicVol
MeterStyle=sBar
BarColor=#Green#
X=15
Y=30
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

I set up a new icon for Line In. So now there are four meters:
MicIcon , MicPercent , LineIcon , LinePercent

And 3 Bars:
MicBar , LineBar , LevelBar

MicIcon and LineIcon should adjust icon to show Mute state and if unplugged, Mic only. Unplugged works by changing icon colour, but Mute icon doesn't change even though About/Skins shows the state correctly as a string and the ToolTip shows the state as 0 or 1 too. Everything is picking up this change in the Mute status, but the icons just won't change. I looked at the manual for Bar Meter, and it says it needs a percent value which is what is being received by Rainmeter.
EDIT: As an example and test, I set this as a meter to display the output of the mRunMicMute measure and it displays correctly. So why doesn't the icon change when it detects this change from 0 to 1 and back?

Code: Select all

[mString]
Measure=String
String=mRunMicMute
; "0":"UnMuted","1":"Muted"
IfMatch=1
IfMatchAction=[!SetOption MicIcon Text "[\xEC54]"][!SetOption MicIcon FontColor "#Red#"] [!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MicIcon Text "[\xE720]"][!SetOption MicIcon FontColor "#Green#"] [!UpdateMeter *][!Redraw]
[String]
Meter=String
MeasureName=mRunMicMute
MeterStyle=sAllText | sHighlight
x=90
y=15
MicBar and LineBar refuse to read the output of mRunMicVol and mRunLineVol even though MicPercent and LinePercent are working perfectly. I can't see anything wrong and have tried everything I can think of, checked the manual to make sure I'm doing it right and that I haven't missed anything. This works in the other version of the Mic skin, so I don't understand the problem. Unless it's to do with measuring those two meters? But then if that's an issue, why does everything else work? In the Bar Meter's MeasureName, can I specify a Variable? Tried both here, neither works. Also tried Min/Max Values with no success.

LevelBar works fine. as does any change updates to volume and mute status. The problems I'm having are the only ones so far. But after spending two days trying to figure this out, I really need help! :oops:

Here's the entire code so far:

Code: Select all

[Rainmeter]
Update=50
AccurateText=1
DynamicWindowSize=1
OnRefreshAction=[!CommandMeasure mRunMicVol "Run"][!CommandMeasure mRunLineVol "Run"][!CommandMeasure mRunMicMute "Run"][!CommandMeasure mRunLineMute "Run"]
SkinHeight=44

[Metadata]
Name=RoundVolume
Author=sl23
Information=Adjust Mic volume.||Credits:||Help via forum: JSMorley, death.crafter, Yincognito.||Thanks to JSMorley for the AudioDeviceList skin. Massive thanks to Yincognito, without whom, this wouldn't have happened!
Version=2024.06.18
License=CC BY 3.0

[Variables]
Aqua=0,255,255
AquaDark=64,191,167,200
AquaDark2=0,255,255,150
Green=128,255,0,220
Orange=255,170,0
Red=255,100,100
Trans=0,0,0,1
White=255,255,255,200
White20=255,255,255,20
White60=255,255,255,60
Yellow=255,255,0,200

BgFill=0,0,0,150
VolBar=64,191,167,200

VolLow=25
VolMax=80
InputStep=5
MicVol=
LineVol=
MicMute=
LineMute=

NAME1=Low
NAME2=Mute
NAME3=Hi

; CmdFriendlyID=DeviceName\Type\Name\Direction
; CmdFriendlyID=USB Audio\Device\Microphone\Capture
Mic=USB Audio\Device\Microphone\Capture
Line=Realtek(R) Audio\Device\Line In\Capture

========================================
; Background
========================================
[Bg]
Meter=Shape
Shape=Rectangle 0,0,170,40,5 | FillColor #BgFill# | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=Stroke Color #White60#
UpdateDivider=-1
X=1
Y=1

========================================
; STYLES
========================================
[sAllText]
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=Center
FontSize=12
FontColor=#White#
AntiAlias=1
DynamicVariables=1

[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "#Green#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]

[sBar]
BarOrientation=Horizontal
BarColor=#Yellow#
SolidColor=#White60#
DynamicVariables=1
W=150
H=1

========================================
; Set Audio In Volume
========================================
[mMicdbLevel]
Measure=Plugin
Plugin=AudioLevel
Port=Input
RMSAttack=50
RMSDecay=300
;Set your desired Mic-response here--------------------
RMSGain=10

[mDeviceStatus]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceStatus
Substitute="0":"Off","1":"On"

[mDeviceList]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceList
Substitute="}: ":"}		"
OnChangeAction=[!Refresh]

[mDeviceName]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceName
;RegExpSubstitute=1
Substitute="(Realtek(R) Audio)":"(R)","(USB Audio)":"(USB)","Microphone":"Mic"

IfMatch="Mic"
IfMatchAction=[!SetOption MicIcon FontColor "#Green#"][!UpdateMeter *] [!Redraw]
IfNotMatchAction=[!SetOption MicIcon FontColor "#White60#"][!UpdateMeter *] [!Redraw]
UpdateDivider=-1

[mDeviceID]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceID
RegExpSubstitute=1
Substitute="{.*}\.":""
UpdateDivider=-1

[mDeviceFormat]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=Format
UpdateDivider=-1

========================================
; Get Audio In Status
========================================
[mRunMicVol]
Measure=Plugin
Plugin=RunCommand
Parameter=#CURRENTPATH#svcl.exe /stdout /getpercent "#Mic#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetVariable MicVol "[mRunMicVol]"]
Substitute=".0":""
UpdateDivider=-1

[mRunMicMute]
Measure=Plugin
Plugin=RunCommand
Parameter=#CURRENTPATH#svcl.exe /stdout /getmute "#Mic#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetVariable MicMute "[mRunMicMute]"]
UpdateDivider=-1

; "0":"UnMuted","1":"Muted"
IfMatch=1
IfMatchAction=[!SetOption MicIcon Text "[\xEC54]"][!SetOption MicIcon FontColor "#Red#"] [!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MicIcon Text "[\xE720]"][!SetOption MicIcon FontColor "#Green#"] [!UpdateMeter *][!Redraw]

[mRunLineVol]
Measure=Plugin
Plugin=RunCommand
Parameter=#CURRENTPATH#svcl.exe /stdout /getpercent "#Line#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetVariable LineVol "[mRunLineVol]"][!Update]
Substitute=".0":""
UpdateDivider=-1

[mRunLineMute]
Measure=Plugin
Plugin=RunCommand
Parameter=#CURRENTPATH#svcl.exe /stdout /getmute "#Line#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetVariable LineMute "[mRunLineMute]"]
UpdateDivider=-1

; "0":"UnMuted","1":"Muted"
IfMatch=1
IfMatchAction=[!SetOption LineIcon Text "[\xEC54]"][!SetOption LineIcon FontColor "#Red#"] [!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption LineIcon Text "[\xE720]"][!SetOption LineIcon FontColor "#Yellow#"] [!UpdateMeter *][!Redraw]

========================================
; METERS
========================================
[MicIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=12
Text=

LeftMouseUpAction=[Play "#@#Volume\Copy.wav"][!SetClip "; Windows Default Input Device:#CRLF##CRLF#; Device Name:      [mDeviceName]#CRLF#; Device ID:        [mDeviceID]#CRLF#; Device Format:    [mDeviceFormat]#CRLF#; Device Status:    [mDeviceStatus]#CRLF##CRLF#; Device List:#CRLF##CRLF#[mDeviceList]"]
MiddleMouseUpAction=[!Refresh]
RightMouseUpAction=;[!CommandMeasure mRunMicVol "Run"]

X1MouseUpAction=ms-settings:sound
X2MouseUpAction=[control mmsys.cpl]

ToolTipIcon=Info
ToolTipTitle=[mDeviceName] - [mDeviceStatus]
ToolTipText=L - Copy Device List#CRLF#M - Refresh#CRLF#R - #CRLF#X1 - CP Sound Settings#CRLF#X2 - Main Sound Settings

DynamicVariables=1
X=30
Y=8

[MicPercent]
Meter=String
MeterStyle=sAllText | sHighlight
FontColor=#White#
Percentual=1
NumOfDecimals=0
Text=#MicVol#

LeftMouseUpAction=[!SetVariable MicVol 25]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Mic#" 25][!CommandMeasure mRunMicVol "Run"][!Update]
MiddleMouseUpAction=["#CURRENTPATH#SoundVolumeView.exe" /Switch "#Mic#"][!CommandMeasure mRunMicMute "Run"][!Update]
RightMouseUpAction=[!SetVariable MicVol 80]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Mic#" 80][!CommandMeasure mRunMicVol "Run"][!Update]

TooltipIcon=Info
ToolTipTitle=Mic - [mRunMicMute]
ToolTipText=L - #NAME1##CRLF#M - #NAME2##CRLF#R - #NAME3#

MouseScrollUpAction=[!SetVariable MicVol (Clamp(#MicVol#+#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Mic#" 5][!CommandMeasure mRunMicVol "Run"][!Update]
MouseScrollDownAction=[!SetVariable MicVol (Clamp(#MicVol#-#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Mic#" -5][!CommandMeasure mRunMicVol "Run"][!Update]
DynamicVariables=1
X=25r
Y=-2r

[LineIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=12
Text=

DynamicVariables=1
X=55r
Y=8

[LinePercent]
Meter=String
MeterStyle=sAllText | sHighlight
FontColor=#White#
Text=#LineVol#

LeftMouseUpAction=[!SetVariable LineVol 25]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Line#" 25][!CommandMeasure mRunLineVol "Run"][!Update]
MiddleMouseUpAction=["#CURRENTPATH#SoundVolumeView.exe" /Switch "#Line#"][!CommandMeasure mRunLineMute "Run"][!Update]
RightMouseUpAction=[!SetVariable LineVol 80]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Line#" 80][!CommandMeasure mRunLineVol "Run"][!Update]

TooltipIcon=Info
ToolTipTitle=Line In - [mRunLineMute]
ToolTipText=L - #NAME1##CRLF#M - #NAME2##CRLF#R - #NAME3##CRLF#

MouseScrollUpAction=[!SetVariable LineVol (Clamp(#LineVol#+#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Line#" 5][!CommandMeasure mRunLineVol "Run"][!Update]
MouseScrollDownAction=[!SetVariable LineVol (Clamp(#LineVol#-#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Line#" -5][!CommandMeasure mRunLineVol "Run"][!Update]
DynamicVariables=1
X=25r
Y=-2r

[MicBar]
Meter=Bar
MeasureName=#MicVol#
MeterStyle=sBar
BarColor=#Green#
X=11
Y=30

[LineBar]
Meter=Bar
MeasureName=mRunLineVol
MeterStyle=sBar
BarColor=#Yellow#
X=11
Y=34

[LevelBar]
Meter=Bar
MeasureName=mMicdbLevel
MeterStyle=sBar
BarColor=#AquaDark#
X=11
Y=38
One other issue though minor, is that when I turn my PC on, the volume often is set with a random number and a decimal value, ie, 77.4.
Looking at that RegEx page you pointed to, I got this to match the decimal and any number after that: /\.\d/g yet inserting this in the meters mRunMicVol and mRunLineVol doesn't work. I also tried removing the g and the forward slash's, but it won't remove the decimal values. Could you help with that please.
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

Also come across another problem with dynamically changing the icon colour depending on 3 factors:
1. Mic Muted - Red
2. Mic Unmuted - Green
3. Mic Disconnected - Grey

But as they are spread over two separate measures, they are conflicting and won't go grey on disconnection.
I assume I need a Calc measure, but how do I set it to calculate two measure values?

EDIT: Think I've solved this, but can't tell until I get the reaction from mRunMicMute to change the font colour. I just don't understand why the IfMatch doesn't react to changes in any of the RunCommands, even though those changes are reflected instantly in the Sound settings, About/Skins window and the skin itself via a string meter. But trying to get it to change colour or icon shown seems impossible???
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

Am I missing something really stupid? O.O
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

Something not right here. I've been reading the manual about RunCommand. it says it returns the string value, which is showing in the About/Skins window and the Meter called String as well as the ToolTipText. It changes every time I click to toggle it. No problems there.

Then I read that all general measure options are available. But even the OnChangeAction doesn't work to toggle a meter on and off when there's a change in the Mute string. Wtf is going on! Been at this for nearly three days and it's just beat me!

For what it is and how useful it is in it's current state far outweighs the previous AudioDeviceCmdlet versions! I feel it's worth persevering with this, but can someone tell me what exactly is wrong with it please, it's driving me bonkers! :x

Thanks.
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

The number value of the measure will indicate if the command finished with or without any errors. You can get the number value of the measure by using Section Variables (e.g. [MeasureName:]). Before the command has first run, the number value of the measure will be -1. While the command is running, the number value of the measure will be 0. If an error occurs, the number value of the measure will indicate the type of error that has occurred. If the program finishes without error, the number value of the measure will be 1, meaning "success". These can be used to take different skin actions depending on the numeric return value.
The number values for all the RunCommand measures are always set at -1 is that why this isn't working?
- MuLab -
User avatar
Yincognito
Rainmeter Sage
Posts: 7551
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [!Refreshapp] when skin loaded?

Post by Yincognito »

sl23 wrote: June 20th, 2024, 7:10 pm The number values for all the RunCommand measures are always set at -1 is that why this isn't working?
Most likely, try with:

Code: Select all

Program=#CURRENTPATH#svcl.exe
Parameter=/stdout /getpercent "#Mic#"
instead of:

Code: Select all

Parameter=#CURRENTPATH#svcl.exe /stdout /getpercent "#Mic#"
so that it's clearer to Rainmeter that the program you expect output from is svcl.exe and not cmd.exe.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

Thanks, but already tested that and didn't work either! :confused:

The Mute status even gets output to a text file, so it shows it gets the required info. Just don't understand it!

What's really odd is that the OnChangeAction does work but only ocassionally. I tried making the Timeout longer but has no effect.
- MuLab -
User avatar
sl23
Posts: 1225
Joined: February 17th, 2011, 7:45 pm
Location: a Galaxy S7 far far away

Re: [!Refreshapp] when skin loaded?

Post by sl23 »

OMG!!! :o It was the UpdateDivider=-1! Saw it on some examples you posted and thought it was a good idea to use! :lol:

Colour changes when I disconnect and reconnect, but not when I change Mute status, just stays green!
- MuLab -
User avatar
Yincognito
Rainmeter Sage
Posts: 7551
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [!Refreshapp] when skin loaded?

Post by Yincognito »

sl23 wrote: June 20th, 2024, 7:50 pm Thanks, but already tested that and didn't work either! :confused:

The Mute status even gets output to a text file, so it shows it gets the required info. Just don't understand it!

What's really odd is that the OnChangeAction does work but only ocassionally. I tried making the Timeout longer but has no effect.
Well, I told you the sound tools from NirSoft are not 100% reliable, right? And yep, it happens for me too sometimes (not working).

That being said, the problems in your code go beyond that. Here's an adjusted version (be aware that it's modified, so if something is missing, feel free to add that back - and properly - if needed):

Code: Select all

[Rainmeter]
Update=50
AccurateText=1
DynamicWindowSize=1
OnRefreshAction=[!CommandMeasure mRunMicVol "Run"][!CommandMeasure mRunLineVol "Run"][!CommandMeasure mRunMicMute "Run"][!CommandMeasure mRunLineMute "Run"]
SkinHeight=44

[Metadata]
Name=RoundVolume
Author=sl23
Information=Adjust Mic volume.||Credits:||Help via forum: JSMorley, death.crafter, Yincognito.||Thanks to JSMorley for the AudioDeviceList skin. Massive thanks to Yincognito, without whom, this wouldn't have happened!
Version=2024.06.18
License=CC BY 3.0

[Variables]
Aqua=0,255,255
AquaDark=64,191,167,200
AquaDark2=0,255,255,150
Green=128,255,0,220
Orange=255,170,0
Red=255,100,100
Trans=0,0,0,1
White=255,255,255,200
White20=255,255,255,20
White60=255,255,255,60
Yellow=255,255,0,200

BgFill=0,0,0,150
VolBar=64,191,167,200

VolLow=25
VolMax=80
InputStep=5
MicVol=
LineVol=
MicMute=
LineMute=

NAME1=Low
NAME2=Mute
NAME3=Hi

CmdFriendlyIDSyntax=DeviceName\Type\Name\Direction
CmdFriendlyID=USB Audio\Device\Microphone\Capture
Mic=Realtek(R) Audio\Device\Microphone Array\Capture
Line=Realtek(R) Audio\Device\Line In\Capture

---Background---

[Bg]
Meter=Shape
Shape=Rectangle 0,0,170,40,5 | FillColor #BgFill# | StrokeWidth 2 | Extend StrokeAlpha
StrokeAlpha=Stroke Color #White60#
UpdateDivider=-1
X=1
Y=1

---Styles---

[sAllText]
FontFace=Trebuchet MS
StringStyle=Bold
StringAlign=Center
FontSize=12
FontColor=#White#
AntiAlias=1
DynamicVariables=1

[sHighlight]
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "#Green#"] [!UpdateMeter #CURRENTSECTION#] [!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor ""] [!UpdateMeter #CURRENTSECTION#] [!Redraw]

[sBar]
BarOrientation=Horizontal
BarColor=#Yellow#
SolidColor=#White60#
DynamicVariables=1
W=150
H=1

---Set Audio In Volume---

[mMicdbLevel]
Measure=Plugin
Plugin=AudioLevel
Port=Input
RMSAttack=50
RMSDecay=300
RMSGain=10

[mDeviceStatus]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceStatus
Substitute="0":"Off","1":"On"

[mDeviceList]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceList
Substitute="}: ":"}		"
OnChangeAction=[!Refresh]

[mDeviceName]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceName
IfMatch="#Mic#"
IfMatchAction=[!SetOption MicIcon FontColor "#Green#"][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!SetOption MicIcon FontColor "#White60#"][!UpdateMeter *][!Redraw]

[mDeviceID]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=DeviceID
RegExpSubstitute=1
Substitute="{.*}\.":""

[mDeviceFormat]
Measure=Plugin
Plugin=AudioLevel
Parent=mMicdbLevel
Type=Format

---Get Audio In Status---

[mRunMicVol]
Measure=Plugin
Plugin=RunCommand
Program=#CURRENTPATH#svcl.exe
Parameter=/stdout /getpercent "#Mic#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetOption MicVol Formula [mRunMicVol]][!UpdateMeasure MicVol][!UpdateMeter *][!Redraw]
RegExpSubstitute=1
Substitute="(?:\s+|[.]\d+)":""
DynamicVariables=1

[MicVol]
Measure=Calc
Formula=0
MinValue=0
MaxValue=100
DynamicVariables=1

[mRunMicMute]
Measure=Plugin
Plugin=RunCommand
Program=#CURRENTPATH#svcl.exe
Parameter=/stdout /getmute "#Mic#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetOption MicMute Formula [mRunMicMute]][!UpdateMeasure MicMute][!UpdateMeter *][!Redraw]
DynamicVariables=1

[MicMute]
Measure=Calc
Formula=0
IfCondition=(MicMute=1)
IfTrueAction=[!SetOption MicIcon Text "[\xEC54]"][!SetOption MicIcon FontColor "#Red#"][!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption MicIcon Text "[\xE720]"][!SetOption MicIcon FontColor "#Green#"][!UpdateMeter *][!Redraw]
DynamicVariables=1

[mRunLineVol]
Measure=Plugin
Plugin=RunCommand
Program=#CURRENTPATH#svcl.exe
Parameter=/stdout /getpercent "#Line#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetOption LineVol Formula [mRunLineVol]][!UpdateMeasure LineVol][!UpdateMeter *][!Redraw]
RegExpSubstitute=1
Substitute="(?:\s+|[.]\d+)":""
DynamicVariables=1

[LineVol]
Measure=Calc
Formula=0
MinValue=0
MaxValue=100
DynamicVariables=1

[mRunLineMute]
Measure=Plugin
Plugin=RunCommand
Program=#CURRENTPATH#svcl.exe
Parameter=/stdout /getmute "#Line#"
State=Hide
Timeout=250
OutputType=ANSI
FinishAction=[!SetOption LineMute Formula [mRunLineMute]][!UpdateMeasure LineMute][!UpdateMeter *][!Redraw]
DynamicVariables=1

[LineMute]
Measure=Calc
Formula=0
Substitute="0":"UnMuted","1":"Muted"
IfCondition=(LineMute=1)
IfTrueAction=[!SetOption LineIcon Text "[\xEC54]"][!SetOption LineIcon FontColor "#Red#"] [!UpdateMeter *][!Redraw]
IfFalseAction=[!SetOption LineIcon Text "[\xE720]"][!SetOption LineIcon FontColor "#Yellow#"] [!UpdateMeter *][!Redraw]
DynamicVariables=1

---METERS---

[MicIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=12
Text=

LeftMouseUpAction=[Play "#@#Volume\Copy.wav"][!SetClip "; Windows Default Input Device:#CRLF##CRLF#; Device Name:      [mDeviceName]#CRLF#; Device ID:        [mDeviceID]#CRLF#; Device Format:    [mDeviceFormat]#CRLF#; Device Status:    [mDeviceStatus]#CRLF##CRLF#; Device List:#CRLF##CRLF#[mDeviceList]"]
MiddleMouseUpAction=[!Refresh]
RightMouseUpAction=[!CommandMeasure mRunMicVol "Run"]

X1MouseUpAction=ms-settings:sound
X2MouseUpAction=[control mmsys.cpl]

ToolTipIcon=Info
ToolTipTitle=[mDeviceName] - [mDeviceStatus]
ToolTipText=L - Copy Device List#CRLF#M - Refresh#CRLF#R - #CRLF#X1 - CP Sound Settings#CRLF#X2 - Main Sound Settings

DynamicVariables=1
X=30
Y=8

[MicPercent]
Meter=String
MeterStyle=sAllText | sHighlight
FontColor=#White#
Percentual=1
NumOfDecimals=0
Text=#MicVol#

LeftMouseUpAction=[!SetVariable MicVol 25]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Mic#" 25][!CommandMeasure mRunMicVol "Run"][!Update]
MiddleMouseUpAction=["#CURRENTPATH#SoundVolumeView.exe" /Switch "#Mic#"][!CommandMeasure mRunMicMute "Run"][!Update]
RightMouseUpAction=[!SetVariable MicVol 80]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Mic#" 80][!CommandMeasure mRunMicVol "Run"][!Update]

TooltipIcon=Info
ToolTipTitle=Mic - [mRunMicMute]
ToolTipText=L - #NAME1##CRLF#M - #NAME2##CRLF#R - #NAME3#

MouseScrollUpAction=[!SetVariable MicVol (Clamp(#MicVol#+#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Mic#" 5][!CommandMeasure mRunMicVol "Run"][!Update]
MouseScrollDownAction=[!SetVariable MicVol (Clamp(#MicVol#-#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Mic#" -5][!CommandMeasure mRunMicVol "Run"][!Update]
DynamicVariables=1
X=25r
Y=-2r

[LineIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=12
Text=

DynamicVariables=1
X=55r
Y=8

[LinePercent]
Meter=String
MeterStyle=sAllText | sHighlight
FontColor=#White#
Text=#LineVol#

LeftMouseUpAction=[!SetVariable LineVol 25]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Line#" 25][!CommandMeasure mRunLineVol "Run"][!Update]
MiddleMouseUpAction=["#CURRENTPATH#SoundVolumeView.exe" /Switch "#Line#"][!CommandMeasure mRunLineMute "Run"][!Update]
RightMouseUpAction=[!SetVariable LineVol 80]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Line#" 80][!CommandMeasure mRunLineVol "Run"][!Update]

TooltipIcon=Info
ToolTipTitle=Line In - [mRunLineMute]
ToolTipText=L - #NAME1##CRLF#M - #NAME2##CRLF#R - #NAME3##CRLF#

MouseScrollUpAction=[!SetVariable LineVol (Clamp(#LineVol#+#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Line#" 5][!CommandMeasure mRunLineVol "Run"][!Update]
MouseScrollDownAction=[!SetVariable LineVol (Clamp(#LineVol#-#InputStep#,0,100))]["#CURRENTPATH#SoundVolumeView.exe" /ChangeVolume "#Line#" -5][!CommandMeasure mRunLineVol "Run"][!Update]
DynamicVariables=1
X=25r
Y=-2r

[MicBar]
Meter=Bar
MeasureName=MicVol
MeterStyle=sBar
BarColor=#Green#
X=11
Y=30

[LineBar]
Meter=Bar
MeasureName=mRunLineVol
MeterStyle=sBar
BarColor=#Yellow#
X=11
Y=34

[LevelBar]
Meter=Bar
MeasureName=mMicdbLevel
MeterStyle=sBar
BarColor=#AquaDark#
X=11
Y=38
I could only test the Mic thing, since I don't have a Line In on my laptop (used to have on my PC back in the day), so that was the focus. I mainly adjusted the measures, didn't touch the meters, so there might be some mistakes left on the latter. Don't forget to set stuff on the MicVol MEASURE and not VARIABLE in the meters, since I used a measure because it was needed for percentual values (you can't have percentual values on a variable, duh).
sl23 wrote: June 20th, 2024, 8:13 pm OMG!!! :o It was the UpdateDivider=-1! Saw it on some examples you posted and thought it was a good idea to use! :lol:
Yep, my bad, I keep forgetting on which measures that is prone to surprises - I knew it's one type of measure, but I keep forgetting which the next time I do it. Will forget it this time too, not a big deal, lol.

P.S. Also, a small observation: you ask too many questions at once or in quick successtion - that, the length and missing details about the code makes things hard to follow. Otherwise, I like your "talkative" nature. :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth