jsmorley wrote:My only concern with that approach is that it makes the assumption that Rainmeter.ini is encoded as ANSI or UTF-8. That may not be true in the future, and Lua will not be able to read or parse Rainmeter.ini.
Hmm... my original method used WebParser, but WebParser did not work consistently for me and took too long to parse the file. So I started using ReadINI instead.
I just don’t see any other way to get quick, consistent, workable skin state detection without using ReadINI.
raiguard wrote:Hmm... my original method used WebParser, but WebParser did not work consistently for me and took too long to parse the file. So I started using ReadINI instead.
I just don’t see any other way to get quick, consistent, workable skin state detection without using ReadINI.
There really is no good way today, since the only place we currently "expose" the actual skin .ini file that is loaded is in the number set in Active in Rainmeter.ini. We are chewing on this...
Today, your best bet is to have the skins be in different config folders, then you can rely on just knowing the "config" and my little plugin works pretty well.
jsmorley wrote:There really is no good way today, since the only place we currently "expose" the actual skin .ini file that is loaded is in the number set in Active in Rainmeter.ini. We are chewing on this...
Today, your best bet is to have the skins be in different config folders, then you can rely on just knowing the "config" and my little plugin works pretty well.
I just took a look at your plugin, and it seems like it would work fairly well. My only request would be to have an option for it to emulate the “active” key in Rainmeter.ini, so that if the second variant is loaded, it will be set to 2. Then I could replace ReadINI when the file format gets changed.
I really like ReadINI and had plans to use it more for even cooler things, but it seems that the encoding conflict between Rainmeter and LUA will be impossible to handle.
raiguard wrote:I just took a look at your plugin, and it seems like it would work fairly well. My only request would be to have an option for it to emulate the “active” key in Rainmeter.ini, so that if the second variant is loaded, it will be set to 2. Then I could replace ReadINI when the file format gets changed.
I really like ReadINI and had plans to use it more for even cooler things, but it seems that the encoding conflict between Rainmeter and LUA will be impossible to handle.
Trouble is, I have no way today in the plugin to do that, other than just loading and parsing Rainmeter.ini (to get the number) and sorting the .ini files found in the folder, (to get the name) which has the same encoding issues that Lua has.
Give us a bit to chew on some ideas we have for this issue.
Cusanus wrote:Thought this might work, but it only seems to unload the current skin, whereas, I'd like to click on a meter in the current skin and have it exchange it for another skin. After many hours, I found this and tried using this statement:
MouseUpAction[!ToggleConfig "My Projector" "SystemInfo.ini"]
MyProjector is the folder name for the two ini files, Projector.ini and SystemInfo.ini. The idea was to dump the Projector skin and load the SystemInfo skin, but all that happens is that the current skin is dumped. Is it possible to have the other ini loaded as well?
In the posted MouseUpAction option an equality is missing. Its complete and correct form would be: MouseUpAction[color=#FF0000]=[/color][!ToggleConfig "My Projector" "SystemInfo.ini"]. Make sure you have that equal sign in the appropriate option.
Then I don't think the !ToggleConfig option would be good for a such action. I'd replace it with !ActivateConfig: MouseUpAction=[!ActivateConfig "My Projector" "SystemInfo.ini"].
Cusanus wrote:Thought this might work, but it only seems to unload the current skin, whereas, I'd like to click on a meter in the current skin and have it exchange it for another skin. After many hours, I found this and tried using this statement:
MouseUpAction[!ToggleConfig "My Projector" "SystemInfo.ini"]
MyProjector is the folder name for the two ini files, Projector.ini and SystemInfo.ini. The idea was to dump the Projector skin and load the SystemInfo skin, but all that happens is that the current skin is dumped. Is it possible to have the other ini loaded as well?
Let's start by correcting your bang: "MouseUpAction" ... it must be have Left/Right/Middle added to make it a legal bang, and as balala pointed out, you are missing an equal symbol after the bang...
So your original bang should be something like: LeftMouseUpAction=[!ToggleConfig "My Projector" "SystemInfo.ini"].
That will change the current state of SystemInfo.ini. But how do you know what the current state is?
Balala's suggestion to use !ActivateConfig will work once, but if you want the same button to toggle a different config on the next click, then JSMorley's plugin is your best solution.
Any other solution would involve a hideous mess of a bang statement, when JSMorley's plugin will take care of determining the current status and allow for correct IfCondition actions.
eclectic-tech wrote:Let's start by correcting your bang: "MouseUpAction" ... it must be have Left/Right/Middle added to make it a legal bang, and as balala pointed out, you are missing an equal symbol after the bang...
You're absolutely right! I fixed the missing equal sign issue, but didn't notice the incorrect option name. My fault...
balala wrote:You're absolutely right! I fixed the missing equal sign issue, but didn't notice the incorrect option name. My fault...
Apologies to all, brain has been scrambled due to helping friends with more serious problems. Disregard previous problems that I've edited out here. Balala's solution works fine, though the ToggleConfig or ToggleFade do not. I had left a conflicting left mouse instruction elsewhere that was derailing the correct one. So, thanks MUCH to you all.
[MeterInfoString]
Meter=String
Text=System Info
SolidColor=0,0,0,1
;this works as does MiddleMouseUpAction
LeftMouseUpAction=[!ActivateConfig "MyProjector" "SystemInfo.ini"]
Cusanus wrote:though the ToggleConfig or ToggleFade do not.
Just note here that the !ToggleConfig and the !ToggleFade bangs are doing completely different things: while !ToggleConfig loads / unloads a skin, !ToggleFade shows / hides and already loaded skin (using a fade effect). The last one can't be used to load an unloaded skin.
Glad if you got it working as you wanted.