Coding in general and Rainmeter in particular don't really work on guesses, but rather on more precise things. The most obvious thing in your skin code is that it uses PowerPlugin options or option values that simply don't exist in the said plugin (e.g. Index, BatteryStatus, BatteryCount):
https://docs.rainmeter.net/manual/plugins/power/
You cannot just pull options and option values out of thin air and expect them to work, they have to be supported by the said measure or plugin. In this case, they are not, which means you won't be able to get data for both of your batteries, even though you might be able to get it for one of them.
That being said, you might get "something" about both batteries (though not enough, nor really convenient) by running a PowerShell command like Get-CimInstance -Namespace 'root/wmi' -ClassName BatteryStatus or variations of this, in a RunCommand measure (see the example at the bottom of the RunCommand page for a start, and make sure to test this first in a PowerShell window). Take into account that not all items there will be the actual batteries you need, generally the InstanceName of such will resemble strings like ACPI\PNP0C0A\2&daba3ff&0_0 and similar. Also, nothing guarantees that the fields that are populated in the case of your system will be populated for a different system as well. The thing is, you can't really use RunCommand for a very frequent periodic update of that data, as the plugin involves running a program with whatever parameters and getting the STDOUT output of the said program only when it exits / terminates. You could however retrieve such data every 10 seconds or so, like your original skin seems to be coded to.
Of course, there's also the unlikely possibility that someone has made a plugin supporting multiple system batteries, but I'd doubt that since such scenarios are not that common anyway.
https://docs.rainmeter.net/manual/plugins/power/
You cannot just pull options and option values out of thin air and expect them to work, they have to be supported by the said measure or plugin. In this case, they are not, which means you won't be able to get data for both of your batteries, even though you might be able to get it for one of them.
That being said, you might get "something" about both batteries (though not enough, nor really convenient) by running a PowerShell command like Get-CimInstance -Namespace 'root/wmi' -ClassName BatteryStatus or variations of this, in a RunCommand measure (see the example at the bottom of the RunCommand page for a start, and make sure to test this first in a PowerShell window). Take into account that not all items there will be the actual batteries you need, generally the InstanceName of such will resemble strings like ACPI\PNP0C0A\2&daba3ff&0_0 and similar. Also, nothing guarantees that the fields that are populated in the case of your system will be populated for a different system as well. The thing is, you can't really use RunCommand for a very frequent periodic update of that data, as the plugin involves running a program with whatever parameters and getting the STDOUT output of the said program only when it exits / terminates. You could however retrieve such data every 10 seconds or so, like your original skin seems to be coded to.
Of course, there's also the unlikely possibility that someone has made a plugin supporting multiple system batteries, but I'd doubt that since such scenarios are not that common anyway.
Statistics: Posted by Yincognito — Today, 3:19 pm