I currently have a WiFi selector of sorts, but on refresh, it loses the FillColor it gains upon selection. I'd like it to keep the colour.
As it stands, I use a series of Bangs to reset the colour to non clicked before then setting the one clicked to it's selected colour, if that makes sense. It works fine as it is, but as I said, I'd like the selected button to show it is selected after a !Refresh.
Due to the !WriteKeyValue, as you can see, this gets added: FillAlpha=FillColor 128,255,0
If I could change this: LeftMouseUpAction=[!SetOptionGroup WiFi FillAlpha "FillColor #Color5#"]
To this: LeftMouseUpAction=[!WriteKeyValueGroup WiFi FillAlpha "FillColor #Color5#"]
All would be well. Is there any chance you could add Group to !WriteKeyValue please Mr JSMorley?
The only other way that I know is to write a separate !WriteKeyValue bang for each WiFi button.
Is there a simpler way?
PS, one other thing, why isn't the IP address being updated when I change WiFi or disconnect it?
Thanks for any help
Last edited by sl23 on August 28th, 2021, 8:54 pm, edited 1 time in total.
Sounds good. But it's kinda impossible, given the way writekeyvalue works.
If you look at WriteKeyValue's parameters, they are in order, section, key, value and filepath. So, basically it writes stuff to a file. It doesn't care about what config it is. The default filepath parameter becomes #CURENTPATH##CURRENTFILE#.
So basically it can't do section groups, or config groups for that matter.
I have a simple Lua function that does this but I am not on my pc rn. So if you want I can share it tommorow.
But for some reason, although it writes the info to the meters, the skin does not update to show the correct button selection.
Any idea why?
PS. I think it would be useful to be able to specify more than one meter per !WriteKey command using the | character.
For example: [!WriteKeyValue Wifi1|WiFi2|Wifi3|WiFi4|WiFi5 FillAlpha "FillColor #Color5#"]
Well, I'm trying to now write a variable which works, then use IfMatch to set the colour, which isn't working. I suspect it's to do with the Substitute again, but I just don't understand which value I should use, String or Number???
JSMorley, you said before that measures return numerical and string values, is that all of them or some of them?
In particular, the SSID is the culprit here. I'm trying to Substitute the SSID, which in the About window shows a number (0) or the string (sl.23-TT). But I'm using a Variable here so that it is dynamic. Nothing seems to work. Can I even use a Variable here?
sl23 wrote: ↑August 28th, 2021, 3:37 pm
Well, I'm trying to now write a variable which works, then use IfMatch to set the colour, which isn't working. I suspect it's to do with the Substitute again, but I just don't understand which value I should use, String or Number???
JSMorley, you said before that measures return numerical and string values, is that all of them or some of them?
In particular, the SSID is the culprit here. I'm trying to Substitute the SSID, which in the About window shows a number (0) or the string (sl.23-TT). But I'm using a Variable here so that it is dynamic. Nothing seems to work. Can I even use a Variable here?