Appreciate what you've done. Sorry for the narrative, I get impatient and frustrated easily! Found out recently I have ADHD as well as insomnia! I'm not talkative by nature, just the opposite tbh! Didn't realise you were following, thought you were just on and off the forum helping others.
What was wrong though? I couldn't see what was wrong with what I did. I think there were conflicts with changing the MicIcon colour, it works one minute but then another issue arose where I have to click on the Line In twice to Mute, but trouble is, though the skin doesn't react to the first click, the PC does. Meaning it's always opposite to what it shows! That was with my code though.
I got a bit further since posting that whole code before. Was going to update it but you beat me to it.
Btw, I think the Mic Input and Line In use the same port on laptops. You should check. I could be wrong though, it may be Mic and Line Out? Long time ago now but I had a laptop with one port and found it was a combi jack.
Mostly sorted. Just two issues as far as I can tell...
1. After Loading or a Refresh, middle click on Line In actually Mutes the system Line In, but it isn't registered on Rainmeter as being Muted until you click a second time. This then Unmutes the System and Rainmeter now shows that it is Muted. This worked before and I have no idea why that stopped working.
2. Disconnecting the Mic doesn't set the icon to #White60#, it just stays green. This is what I tried, but it doesn't work now you've changed things. Now, it stays grey...
So, the way it's supposed to work is:
1. Mic Disconnected = #White60#
2. Mic Connected and Active = #Green#
3. Mic Connected and Muted = #Red#
I just can't seem to get both working, one measure always takes priority. My idea was to have the icon turn grey when disconnected by changing the MicIcon meter FontColor=#White60#. But when I plug it in, set that meter to FontColor=#MicColor#. The fact it is connected, changes the variable used to one that the IfMatch uses separately from the [mRunMicMute] one, meaning it shouldn't conflict. Then I could use the IfMatch to set the new variable to Red or Green, but it does conflict for some reason I can't figure out.
sl23 wrote: ↑June 20th, 2024, 9:15 pm
What are these? FinishAction=[!SetOption LineVol Formula [mRunLineVol]]
Is it meant to be a !SetVariable, not !SetOption?
Nope. It's a SetOption, since I used identically named measures instead of variables, like already explained here:
Yincognito wrote: ↑June 20th, 2024, 8:25 pm
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).
So, the fact that you didn't correspondingly modify the meters to act on the MicVol, MicMute, LineVol and LineMute measures instead of variables (already mentioned as well) could explain the scrolling jump.
I just can't seem to get both working, one measure always takes priority.
One way to do this:
- set a numerical variable in the [mDeviceName]'s IfMatch actions, by replacing the existing actions
- test both the MicMute measure and (using && or || as needed) the above variable in the IfCondition from [MicMute] and set FontColor directly in the meter
After Loading or a Refresh, middle click on Line In actually Mutes the system Line In
Are you sure? I only see switching to #Line# and getting (not setting) the #Line#'s mute state in that middle mouse action ...
Time to get sleepy now, maybe you'll get the ideas above until tomorrow.
Oh jeez! Sorry. Think I need a break! Can't see the wood for the trees! Just so tired finding it hard to do this stuff now. Thanks for explaining. Appreciate you're help. A lot!
Last edited by sl23 on June 21st, 2024, 9:41 am, edited 2 times in total.
Scrolling fast on the Mic volume does create a jump occasionally, but corrects itself on the next adjust. Same with Line In, though Mic only seems to do this if adjusted too quickly, Line In does it regularly. Perhaps this is the unreliability you mentioned? Is it a NirSoft issue or a Microsoft one?
Also, the Mutes work, do their job each time they are clicked, again, only Line In suffers here. It very often doesn't update the Mute status and shows the Mute icon when it's not muted and then every click shows the opposite icon. I can't tell if it's the code or another NirSoft/MS issue. Every click performs a change in state, but doesn't always update the skin. Sometimes it can take several clicks to update it.
Are you sure? I only see switching to #Line# and getting (not setting) the #Line#'s mute state in that middle mouse action ...
Yes, sure, but it doesn't update Rainmeter. Every single Refresh is the same, M-click Line In changes the system Mute status, but doesn't update Rainmeter. The only way to get it working properly is to set [!Refresh] at the end of the MiddleMouseUpAction. Tried [!Redraw], same result, doesn't work.
All Bar meters work well too. I may change these to roundline though for this skin. The idea was to merge this code with another skin and will need the meters set as bars I think. Space is tight on the TaskBar, especially in the skin I want to merge this with!
If there's any chance of getting the Line In Mute status working, that would be great. It should run the command to get the info each time it's muted but that just doesn't seem to be the case. Refreshing the skin will always update it correctly, so I'm thinking Ive missed something?
All the Mouse action commands are identical to the Mic versions, obviously changed to suit Line In, and the Mic works, so I'm thinking this can't be a Rainmeter issue then?
The only difference is the LineVol calc measure, where this line is not in the MicVol calc measure: Substitute="0":"UnMuted","1":"Muted". These words are not used in the skin anywhere and are only mentioned here in the code. They are shown in the About/Skins window. Disabling it doesn't break or fix anything though.
Lastly, the MicIcon...
One way to do this:
- set a numerical variable in the [mDeviceName]'s IfMatch actions, by replacing the existing actions
- test both the MicMute measure and (using && or || as needed) the above variable in the IfCondition from [MicMute] and set FontColor directly in the meter
Trying to wrap my poor brain around this!
I am curious, why my approach doesn't work though? Logically, it made sense, so I can't understand why! One sets a variable and one sets the meter, no conflicts, yet it doesn't work, why?
Nah! Sorry, I just really don't understand why you're saying to test MicMute state when I need device name to see if it's connected?
I don't see the logic of how your proposal works. Essentially, there are three states of the MicIcon:
1. Disconnected
2. Connected and UnMuted
3. Connected and Muted. IfMatch doesn't register more than two options. IfAbove, IfEqual and IfBelow seem more appropriate. But I would need to use both the IfMatch and IfActions in the same measure to work. Wouldn't I?
This is how I previously saw it, and still do, and how it should work, but doesn't:
Yes = Use [MicMute] (ie: 'Muted' below) to set icon colour and text
/
MatchName =
\
No = Set colour to #White60# (Grey)
Yes = Set icon colour to #Red# & set icon text to [\xEC54]
/
Muted =
\
No = Set icon colour to #Green# & set icon text to [\xE720]
Plugging/unplugging the Mic does change the String in About/Skins, from Mic to Line. So that is working, but it won't change the IfMatch for mDeviceName to false, ie: not match.
Other than all that, it's great! Thank you again for saving my sanity!
EDIT: Edited latest code above to most recent.
Last edited by sl23 on June 21st, 2024, 1:30 pm, edited 21 times in total.