I don't blame you I bet you've had enough of this one!
![Embarrassed :oops:](./images/smilies/ah.gif)
Oh damn! Never noticed that extra line!
Just in case the code you tried isn't the same as my working code, here's my end result. Though I'm working on the idea of merging JSMorley skin sliders with it so there's just a simple small circle for an indicator of set volume instead of the whole bar. Not sure if I'll like it that way or just return it to using roundline. Don't worry, I'll not bother you again with this.
Can't thank you enough, you've been such a great help and very patient, thanks for that.
![Thumbs Up :thumbup:](./images/smilies/ay.gif)
![Great :great:](./images/smilies/dn.gif)
![Rose Gift :rosegift:](./images/smilies/ax.gif)
Here's the final code:
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.22
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=
InputVolume=0
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
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
Substitute="(Realtek(R) Audio)":"(R)","(USB Audio)":"(USB)","Microphone":"Mic"
IfMatch="Mic"
IfMatchAction=[!EnableMeasure MicMute][!ShowMeter MicPercent][!UpdateMeter *][!Redraw]
IfNotMatchAction=[!DisableMeasure MicMute][!HideMeter MicPercent][!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
;[!SetOption (MicBarShape:X) Formula [mRunMicVol]]
[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
FontColor=#White60#
Text=[\xE720]
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
X=30
Y=8
[MicPercent]
Meter=String
MeterStyle=sAllText | sHighlight
FontColor=#White#
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=.
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]
X=25r
Y=-2r
[LineIcon]
Meter=String
MeterStyle=sAllText
FontFace=Segoe Fluent Icons
FontSize=12
Text=[\xE720]
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][!Refresh]
RightMouseUpAction=[!SetVariable LineVol 80]["#CURRENTPATH#SoundVolumeView.exe" /SetVolume "#Line#" 80][!CommandMeasure mRunLineVol "Run"][!Update]
TooltipIcon=Info
ToolTipTitle=Line In - [mRunLineMute]
ToolTipText=.
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]
X=25r
Y=-2r
======================================
[MicBarShape]
Meter=Shape
Shape=Rectangle 0,0,4,6,0 | Fill Color #Green#
DynamicVariables=1
;X=[mRunMicVol]+9
X=([MicVol:]*150/100)+9
Y=25
[LevelBar]
Meter=Bar
MeasureName=mMicdbLevel
MeterStyle=sBar
BarColor=#AquaDark#
X=11
Y=7r
[LineBarShape]
Meter=Shape
Shape=Rectangle 0,0,4,6,0 | Fill Color #Yellow#
DynamicVariables=1
X=([LineVol:]*150/100)+9
Y=2r
=======================================
;[MicBar]
;Meter=Bar
;MeasureName=MicVol
;MeterStyle=sBar
;BarColor=#Green#
;X=11
;Y=30
;[LineBar]
;Meter=Bar
;MeasureName=LineVol
;MeterStyle=sBar
;BarColor=#Yellow#
;X=11
;Y=34