My recommendation is almost similar to eclectic-tech's one, with a small difference. I'd put a Substitute option in the [MeasureAudioDevice] measure, replacing the strings with numbers, then would use an IfCondition statement, to show / hide the appropriate meters. The only bangs which have to be left on the LeftMouseUpAction options of the [MeterHeadset] and [MeterSpeakers] meters are the !CommendMeasures. Also in this case you can hide both meters (adding a Hidden=1
option to them) from start, because the !ShowMeter / !HideMeter bangs added to the IfTrueAction / IfFalseAction options will show up the right meter:
Code: Select all
IfTrueAction=[!HideMeter "MeterHeadset"][!ShowMeter "MeterSpeakers"][!Redraw]
IfFalseAction=[!ShowMeter "MeterHeadset"][!HideMeter "MeterSpeakers"][!Redraw]
LeftMouseUpAction=[!CommandMeasure MeasureAudioDevice "ToggleNext"]
LeftMouseUpAction=[!CommandMeasure MeasureAudioDevice "TogglePrevious"]
Note that you have to complete the Substitute option of the [MeasureAudioDevice] measure, according to the strings returned by the measure on your computer, in both situations.
If you have to use the string values returned by the [MeasureAudioDevice] measure anywhere else in the code, you can add a suplimentar String measure, to can use the IfConditions (or IfMatch) there. Let me know if you want to try my code and don't know how to do this.
eclectic-tech wrote: ↑
March 12th, 2019, 4:58 am
This also let's you eliminate skin updates; mouse clicks take care of the updates.
Not too useful for example with my above code, because this prevents the skin to react if you're making a change manually, not by clicking the skin. That's why I used the default Update=1000