Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1185

Help: Rainmeter Skins • Re: Again with the ToolTips!

$
0
0
Oh, geez, forgot about that! How come it worked for me before though? The previous version of this skin works fine for me:

Code:

[Rainmeter]Update=#Update#AccurateText=1MouseActionCursor=0DragGroup=BarredBackgroundMode=2SolidColor=#Trans#DynamicWindowSize=1OnRefreshAction=[!CommandMeasure mRunMicVol "Run"][!CommandMeasure mRunLineVol "Run"][!CommandMeasure mRunMicMute "Run"][!CommandMeasure mRunLineMute "Run"]MouseOverAction=[!ToggleMeterGroup Icons]MouseLeaveAction=[!ToggleMeterGroup Icons][Metadata]Name=MicroVolAuthor=sl23Information=Volume Controls for Output, Line In and Mic. ||Thanks to Yincognito, balala and eclectic-tech for help and support.Version=2024.7.25License=CC BY 3.0[Variables]Aqua=0,255,255AquaDark=#Aqua#,200Bg=255,255,255,4Blue=64,143,191Green=128,255,0Orange=255,170,0OrangeDark=255,128,0Red=255,130,130Trans=0,0,0,1White=255,255,255,140White20=255,255,255,20White40=255,255,255,40White60=255,255,255,60White100=255,255,255,100Yellow=255,255,0; In/Out bar colours:Alpha=60MicIn=#Aqua#In=#Orange#Out=#Green#; FFT Bar Colours:BarAlpha=220BarColor1=80,64,191,#BarAlpha#BarColor2=64,96,191,#BarAlpha#BarColor3=64,143,191,#BarAlpha#BarColor4=64,191,167,#BarAlpha#BarColor5=64,191,96,#BarAlpha#BarColor6=104,191,64,#BarAlpha#BarColor7=175,191,64,#BarAlpha#BarColor8=191,159,64,#BarAlpha#BarColor9=191,112,64,#BarAlpha#BarColor10=191,64,64,#BarAlpha#; Set Bar Sizes:FFTW=4FFTH=44BarW=10BarH=46Update=50; Set mouse volume:VolLow=25VolMax=80VolStep=5; DON'T TOUCH:MicVol=LineVol=HoldTimeMic=0HoldTimeLine=0HoldTimeOut=0HoldMost=1000FallStep=0.01; CmdFriendlyIDSyntax=DeviceName\Type\Name\Direction; CmdFriendlyID=USB Audio\Device\Microphone\CaptureMic=USB Audio\Device\Microphone\CaptureLine=Realtek(R) Audio\Device\Line In\CaptureMicID={0.0.1.00000000}.{7fb35683-1fea-4fa1-be4a-a3e49b15aeeb}LineID={0.0.1.00000000}.{0633eb3a-04b7-4232-bc8f-5a95f6d9a8f5}========================================; STYLES========================================[sAllText]FontFace=Trebuchet MSStringStyle=BoldStringAlign=CenterCenterFontSize=9FontColor=#White#SolidColor=#Trans#AntiAlias=1DynamicVariables=1UpdateDivider=-1[sButton]Shape=Rectangle 0,0,10,10,5 | Fill Color #Trans# | StrokeWidth 2 | Extend StrokeAlphaStrokeAlpha=Stroke Color #White100#DynamicVariables=1MouseOverAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #Yellow#"][!UpdateMeter *][!Redraw]MouseLeaveAction=[!SetOption #CURRENTSECTION# StrokeAlpha "Stroke Color #White100#"][!UpdateMeter *][!Redraw]ToolTipIcon=InfoHidden=1Group=IconsX=([Bars2:X]+10)========================================; BUTTONS========================================[Button1]Meter=ShapeMeterStyle=sButtonLeftMouseUpAction=[!CommandMeasure "mOutput" "ToggleNext"][!Redraw]MiddleMouseUpAction=[!Refresh]ToolTipTitle=[mOutput]ToolTipText="L - Output Device#CRLF#M - Refresh"Y=8[Button2]Meter=ShapeMeterStyle=sButtonLeftMouseUpAction=ms-settings:soundMiddleMouseUpAction=[control mmsys.cpl]RightMouseUpAction=[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]"]ToolTipTitle=SettingsToolTipText=L ~ Win11#CRLF#M ~ Old#CRLF#R - CopyDeviceListY=23r========================================; SPECTRUM========================================[mAudio]Measure=PluginPlugin=AudioLevelPort=OutputRMSAttack=50RMSDecay=300RMSGain=2.0PeakAttack=50PeakDecay=3000PeakGain=2.0FFTSize=2048FFTAttack=15FFTDecay=300Sensitivity=45Bands=10[mBand0]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=0[mBand1]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=1[mBand2]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=2[mBand3]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=3[mBand4]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=4[mBand5]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=5[mBand6]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=6[mBand7]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=7[mBand8]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=8[mBand9]Measure=PluginPlugin=AudioLevelParent=mAudioType=BandBandIdx=9; FFT BACKGROUND[VolBg]Meter=ShapeShape=Rectangle 0,0,((#FFTW#+1)*10+3),#FFTH#,5 | Fill Color #Trans# | StrokeWidth 2 | StrokeColor #White20#LeftMouseUpAction=    [!CommandMeasure "mOutput" "SetVolume #VolLow#"][!UpdateMeasure mOutput][!UpdateMeter *][!Redraw]MiddleMouseUpAction=  [!CommandMeasure "mOutput" "ToggleMute"][!UpdateMeasure mOutput][!UpdateMeter *][!Redraw]RightMouseUpAction=   [!CommandMeasure "mOutput" "SetVolume #VolMax#"][!UpdateMeasure mOutput][!UpdateMeter *][!Redraw]MouseScrollUpAction=  [!CommandMeasure "mOutput" "ChangeVolume 5"][!UpdateMeasure mOutput][!UpdateMeter *][!Redraw]MouseScrollDownAction=[!CommandMeasure "mOutput" "ChangeVolume -5"][!UpdateMeasure mOutput][!UpdateMeter *][!Redraw]MouseOverAction= [!SetOption VolLevel FontColor "#Green#"][!UpdateMeter VolLevel][!Redraw]MouseLeaveAction=[!SetOption VolLevel FontColor ""][!UpdateMeter VolLevel][!Redraw]X=1Y=1; FFT CONTAINER[BgCover]Meter=ShapeShape=Rectangle 0,0,((#FFTW#+1)*10+3),(#FFTH#-3),5 | Fill Color 0,0,0,200DynamicVariables=1X=rY=1r[FFT]Meter=ShapeShape=Rectangle                  2, 0, #FFTW#, ([mBand0]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor1#Shape2=Rectangle  (2+(#FFTW#+1)*1), 0, #FFTW#, ([mBand1]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor2#Shape3=Rectangle  (2+(#FFTW#+1)*2), 0, #FFTW#, ([mBand2]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor3#Shape4=Rectangle  (2+(#FFTW#+1)*3), 0, #FFTW#, ([mBand3]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor4#Shape5=Rectangle  (2+(#FFTW#+1)*4), 0, #FFTW#, ([mBand4]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor5#Shape6=Rectangle  (2+(#FFTW#+1)*5), 0, #FFTW#, ([mBand5]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor6#Shape7=Rectangle  (2+(#FFTW#+1)*6), 0, #FFTW#, ([mBand6]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor7#Shape8=Rectangle  (2+(#FFTW#+1)*7), 0, #FFTW#, ([mBand7]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor8#Shape9=Rectangle  (2+(#FFTW#+1)*8), 0, #FFTW#, ([mBand8]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor9#Shape10=Rectangle (2+(#FFTW#+1)*9), 0, #FFTW#, ([mBand9]* (-#FFTH#)) | StrokeWidth 0 | Fill Color #BarColor10#DynamicVariables=1Container=BgCoverX=rY=#FFTH#========================================; OUTPUT VOLUME========================================[mOutput]Measure=PluginPlugin=Win7AudioPluginIfCondition=mOutput = -1IfTrueAction=[!SetOption VolLevel Text "Mute"]IfFalseAction=[!SetOption VolLevel Text "[*mOutput:*]"]DynamicVariables=1[VolLevel]Meter=StringMeterStyle=sAllTextFontSize=12Text=[mOutput:]X=([VolBg:X]+((#FFTW#+1)*10+3)/2)Y=([VolBg:Y]+22)========================================; INPUT CONTROL - GET DEVICE INFO========================================[mMicdbLevel]Measure=PluginPlugin=AudioLevelPort=InputID=RMSAttack=50RMSDecay=300RMSGain=2.3DynamicVariables=1[mLinedbLevel]Measure=PluginPlugin=AudioLevelPort=InputID=#LineID#RMSAttack=50RMSDecay=300RMSGain=2.3DynamicVariables=1[mDeviceStatus]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=DeviceStatusSubstitute="0":"Off","1":"On"Group=MIC[mDeviceStatusLine]Measure=PluginPlugin=AudioLevelParent=mLinedbLevelType=DeviceStatusSubstitute="0":"Off","1":"On"[mDeviceList]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=DeviceListSubstitute="}: ":"}"OnChangeAction=[!Refresh][mDeviceName]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=DeviceNameSubstitute="(Realtek(R) Audio)":"(R)","(USB Audio)":"(USB)","Microphone":"Mic","Line In":"Line"Group=MIC[mDeviceNameLine]Measure=PluginPlugin=AudioLevelParent=mLinedbLevelType=DeviceNameSubstitute="(Realtek(R) Audio)":"(R)","(USB Audio)":"(USB)","Microphone":"Mic","Line In":"Line"[mDeviceID]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=DeviceIDIfMatch="#MicID#"IfMatchAction=[!SetOption [mMicdbLevel] ID "#MicID#"][!EnableMeasureGroup MIC][!UpdateMeasureGroup MIC]IfNotMatchAction=[!SetOption [mMicdbLevel] ID ""][!DisableMeasureGroup MIC][!UpdateMeasureGroup MIC][mDeviceFormat]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=FormatGroup=MIC[mDeviceMicRms]Measure=PluginPlugin=AudioLevelParent=mMicdbLevelType=RMSChannel=SumGroup=MIC[mDeviceLineRms]Measure=PluginPlugin=AudioLevelParent=mLinedbLevelType=RMSChannel=Sum========================================; GET AUDIO IN STATUS========================================[mRunMicVol]Measure=PluginPlugin=RunCommandProgram=#@#Mic\svcl.exeParameter=/stdout /getpercent "#Mic#"State=HideTimeout=250OutputType=ANSIFinishAction=[!SetOption MicVol Formula [mRunMicVol]][!UpdateMeasure MicVol][!UpdateMeter *][!Redraw]RegExpSubstitute=1Substitute="(?:\s+|[.]\d+)":""DynamicVariables=1Group=MIC[MicVol]Measure=CalcFormula=0MinValue=0MaxValue=100DynamicVariables=1Group=MIC[mRunMicMute]Measure=PluginPlugin=RunCommandProgram=#@#Mic\svcl.exeParameter=/stdout /getmute "#Mic#"State=HideTimeout=250OutputType=ANSIFinishAction=[!SetOption MicMute Formula [mRunMicMute]][!UpdateMeasure MicMute][!UpdateMeter *][!Redraw]DynamicVariables=1Group=MIC[MicMute]Measure=CalcFormula=0IfCondition=(MicMute=1)IfTrueAction=[!SetOption MicIcon Text "[\xEC54]"][!SetOption MicIcon FontColor "#Red#"][!UpdateMeter *][!Redraw]IfFalseAction=[!SetOption MicIcon Text "[\xE720]"][!SetOption MicIcon FontColor "#Aqua#"][!UpdateMeter *][!Redraw]DynamicVariables=1Group=MIC[mRunLineVol]Measure=PluginPlugin=RunCommandProgram=#@#Mic\svcl.exeParameter=/stdout /getpercent "#Line#"State=HideTimeout=250OutputType=ANSIFinishAction=[!SetOption LineVol Formula [mRunLineVol]][!UpdateMeasure LineVol][!UpdateMeter *][!Redraw]RegExpSubstitute=1Substitute="(?:\s+|[.]\d+)":""DynamicVariables=1[LineVol]Measure=CalcFormula=0MinValue=0MaxValue=100DynamicVariables=1[mRunLineMute]Measure=PluginPlugin=RunCommandProgram=#@#Mic\svcl.exeParameter=/stdout /getmute "#Line#"State=HideTimeout=250OutputType=ANSIFinishAction=[!SetOption LineMute Formula [mRunLineMute]][!UpdateMeasure LineMute][!UpdateMeter *][!Redraw]DynamicVariables=1[LineMute]Measure=CalcFormula=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 "#Orange#"] [!UpdateMeter *][!Redraw]DynamicVariables=1========================================; AUDIO IN METERS========================================[MicIcon]Meter=StringMeterStyle=sAllTextFontFace=Segoe Fluent IconsFontSize=11FontColor=#White60#Text=[\xE720]LeftMouseUpAction=[!SetVariable MicVol 25]["#@#Mic\SoundVolumeView.exe" /SetVolume "#Mic#" 25][!CommandMeasure mRunMicVol "Run"][!Update]MiddleMouseUpAction=["#@#Mic\SoundVolumeView.exe" /Switch "#Mic#"][!CommandMeasure mRunMicMute "Run"][!Update]RightMouseUpAction=[!SetVariable MicVol 80]["#@#Mic\SoundVolumeView.exe" /SetVolume "#Mic#" 80][!CommandMeasure mRunMicVol "Run"][!Update]MouseScrollUpAction=[!SetVariable MicVol (Clamp(#MicVol#+#VolStep#,0,100))]["#@#Mic\SoundVolumeView.exe" /ChangeVolume "#Mic#" 5][!CommandMeasure mRunMicVol "Run"][!Update]MouseScrollDownAction=[!SetVariable MicVol (Clamp(#MicVol#-#VolStep#,0,100))]["#@#Mic\SoundVolumeView.exe" /ChangeVolume "#Mic#" -5][!CommandMeasure mRunMicVol "Run"][!Update]ToolTipTitle=[MicVol]%ToolTipText=[mDeviceName] - [mDeviceStatus]Hidden=1Group=IconsX=([Button1:X]+25)Y=([Button1:Y]+5)[LineIcon]Meter=StringMeterStyle=sAllTextFontFace=Segoe Fluent IconsFontSize=11Text=[\xE720]LeftMouseUpAction=["#@#Mic\SoundVolumeView.exe" /SetVolume "#Line#" 25][!CommandMeasure mRunLineVol "Run"][!Update]MiddleMouseUpAction=["#@#Mic\SoundVolumeView.exe" /Switch "#Line#"][!CommandMeasure mRunLineMute "Run"][!Update][!Refresh]RightMouseUpAction=["#@#Mic\SoundVolumeView.exe" /SetVolume "#Line#" 80][!CommandMeasure mRunLineVol "Run"][!Update]MouseScrollUpAction=[!SetVariable LineVol (Clamp(#LineVol#+#VolStep#,0,100))]["#@#Mic\SoundVolumeView.exe" /ChangeVolume "#Line#" 5][!CommandMeasure mRunLineVol "Run"][!Update]MouseScrollDownAction=[!SetVariable LineVol (Clamp(#LineVol#-#VolStep#,0,100))]["#@#Mic\SoundVolumeView.exe" /ChangeVolume "#Line#" -5][!CommandMeasure mRunLineVol "Run"][!Update]ToolTipTitle=[LineVol]%ToolTipText=[mDeviceNameLine] - [mDeviceStatusLine]Hidden=1Group=IconsX=rY=23r========================================; VU METERS========================================[HoldMic]Measure=CalcFormula=(mDeviceMicRms>HoldMic-#FallStep#*(#HoldTimeMic#>#HoldMost#?1:0)?mDeviceMicRms:(#HoldTimeMic#>#HoldMost#?HoldMic-#FallStep#:HoldMic))OnUpdateAction=[!SetVariable HoldTimeMic ([HoldMic]=[mDeviceMicRms]?0:#HoldTimeMic#+#Update#)]DynamicVariables=1[HoldLine]Measure=CalcFormula=(mDeviceLineRms>HoldLine-#FallStep#*(#HoldTimeLine#>#HoldMost#?1:0)?mDeviceLineRms:(#HoldTimeLine#>#HoldMost#?HoldLine-#FallStep#:HoldLine))OnUpdateAction=[!SetVariable HoldTimeLine ([HoldLine]=[mDeviceLineRms]?0:#HoldTimeLine#+#Update#)]DynamicVariables=1[HoldOut]Measure=CalcFormula=(mAudio>HoldOut-#FallStep#*(#HoldTimeOut#>#HoldMost#?1:0)?mAudio:(#HoldTimeOut#>#HoldMost#?HoldOut-#FallStep#:HoldOut))OnUpdateAction=[!SetVariable HoldTimeOut ([HoldOut]=[mAudio]?0:#HoldTimeOut#+#Update#)]DynamicVariables=1[Bars2]Meter=ShapeShape=Rectangle 0, ([MicVol]*-#BarH#/100)-1, 4, ([mDeviceStatus:]=1 ? 2 : 0) | StrokeWidth 0 | Fill Color #Aqua#Shape2=Rectangle  0, ([LineVol]*-#BarH#/100)-1, 4, ([HoldLine]<0.01 ? 0 : 2) | StrokeWidth 0 | Fill Color #Orange#Shape3=Rectangle                         0, ([mOutput:]*-#BarH#/100)-1, 4, 2 | StrokeWidth 0 | Fill Color #Green#DynamicVariables=1X=((#FFTW#+1)*10+([FFT:X]+7))Y=(#BarH#*1)[Bars]Meter=ShapeShape=Rectangle                              0, 0, #BarW#, -#BarH# | StrokeWidth 0 | Fill Color #Bg#Shape2=Rectangle           0, 0, #BarW#, ([mDeviceMicRms]*-#BarH#) | StrokeWidth 0 | Fill Color #MicIn#,#Alpha#Shape3=Rectangle                    (#BarW#+2), 0, #BarW#, -#BarH# | StrokeWidth 0 | Fill Color #Bg#Shape4=Rectangle (#BarW#+2), 0, #BarW#, ([mDeviceLineRms]*-#BarH#) | StrokeWidth 0 | Fill Color #In#,#Alpha#Shape5=Rectangle                ((#BarW#+2)*2), 0, #BarW#, -#BarH# | StrokeWidth 0 | Fill Color #Bg#Shape6=Rectangle     ((#BarW#+2)*2), 0, #BarW#, ([mAudio]*-#BarH#) | StrokeWidth 0 | Fill Color #Out#,#Alpha#; PeakShape7=Rectangle              0, ([HoldMic]*-#BarH#)-1, #BarW#, ([HoldMic]<0.005?0:2) | StrokeWidth 0 | Fill Color #MicIn#Shape8=Rectangle   (#BarW#+2), ([HoldLine]*-#BarH#)-1, #BarW#, ([HoldLine]<0.005?0:2) | StrokeWidth 0 | Fill Color #In#Shape9=Rectangle ((#BarW#+2)*2), ([HoldOut]*-#BarH#)-1, #BarW#, ([HoldOut]<0.004?0:2) | StrokeWidth 0 | Fill Color #Out#; ClipShape10=Rectangle              0, -#BarH#, #BarW#, ([HoldMic]=1 ? 2 : 0) | StrokeWidth 0 | Fill Color #Red# Shape11=Rectangle    (#BarW#+2), -#BarH#, #BarW#, ([HoldLine]=1 ? 2 : 0) | StrokeWidth 0 | Fill Color #Red# Shape12=Rectangle ((#BarW#+2)*2), -#BarH#, #BarW#, ([HoldOut]=1 ? 2 : 0) | StrokeWidth 0 | Fill Color #Red#DynamicVariables=1Group=IconsX=3RY=(#BarH#*1)[Spacer]Meter=ShapeShape=Rectangle ((#BarW#+2)*3), 0, 6, -#BarH# | StrokeWidth 0 | Fill Color #Trans#DynamicVariables=1X=rY=(#BarH#*1)
I assume it's the asterisks that make it work? Again, forgot about that! :oops: Any idea why it worked in this skin but not the new one in the first post?

Thanks for providing the solution. :thumbup:
OnRefreshAction seems overkill, is that intentional?
EDIT: Just tried the skin without OnRefreshAction and it seems to work ok.
Ok, I see what you added it for, but I personally have no issue without it. Would be helpful to know if anyone else is having the same response as you. :)
Yes, it was the Asterisks, the Obelisks missed them... :sly:

You needed them to escape [MicVol] to literal in the meter from the OP code because of the way IfConditions work without IfConditionMode=1 (see the manual), when they only execute IfTrueAction and IfFalseAction when the logical test changes its value and 'becomes' something else, so only once in those cases, instead of on every measure update. You don't need that in the 2nd code because FinishAction is executed every time the measure gets the STDOUT result.

In other words, in the part from the 1st code, if you set stuff to the unescaped [MicVol] VALUE, that will happen only once at skin load / refresh time when its value is 0, and it will stay so until you toggle the mute and the logical test becomes different in the IfCondition from the measure. However, if you set stuff to the escaped [*MicVol*] REFERENCE, then that reference will be replaced with the current value by the meter instead, every time it updates. In the part from the 2nd code, it's ok to set stuff to the [MicVol] value, since that will be the current one anyway given that FinishAction will run after each measure update.

Regarding OnRefreshAction, I simply ran each command twice, with a 500 ms between duplicates. If I only run it once like in your original code from the OP, the RunCommand measures won't get the STDOUT results at all. It seems that the first time after skin load / refresh I try to run those svcl.exe commands, I have to do it twice to "get it going", after that it'll work fine just once (until the next skin load / refresh, that is). Not sure why it happens, but it only does when ran the first time from a skin, it works fine the first time from, say, the CMD window.

Statistics: Posted by Yincognito — 30 minutes ago



Viewing all articles
Browse latest Browse all 1185

Trending Articles