It is currently July 15th, 2020, 11:43 am

Plugin for HWiNFO

Plugins and Addons popular with the Community
stangowner
Posts: 41
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

Post by stangowner »

Can you just tell me all the special characters and I'll remove those with the whitespace? ,.?!:;'"[]{}<> etc

HWiNFO-Host0-CPU0-Core0Clock=0x6000001
User avatar
jsmorley
Developer
Posts: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

Post by jsmorley »

stangowner wrote:Can you just tell me all the special characters and I'll remove those with the whitespace? ,.?!:;'"[]{}<> etc

HWiNFO-Host0-CPU0-Core0Clock=0x6000001
Mostly you just want to avoid [anything] in general. The brackets run the risk of being confused with one or more types of [SectionVariables]. I'd be tempted to stay away from # if possible too.
stangowner
Posts: 41
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

Post by stangowner »

So if I just go with square brackets, hash and whitespace then it should be OK??
User avatar
jsmorley
Developer
Posts: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

Post by jsmorley »

stangowner wrote:So if I just go with square brackets, hash and whitespace then it should be OK??
Whitespace should be fine if you want to use it. But yeah, I'd avoid [square brackets] and #hash#.
User avatar
jsmorley
Developer
Posts: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

Post by jsmorley »

Ah, yeah, now that I think about it, having whitespace in a "key" isn't a good idea. It's fine in any "value", but not so good in keys.

Good:
SomeKey=Some Value

Bad:
Some Key=Some Value

It's not "forbidden" in Rainmeter, but will only cause heartburn with quoting if you later use the key in a !bang.
User avatar
raiguard
Posts: 662
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Plugin for HWiNFO

Post by raiguard »

So we will want no whitespace, because while variable references are in the values, the variable definitions are keys.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
jsmorley
Developer
Posts: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

Post by jsmorley »

raiguard wrote:So we will want no whitespace, because while variable references are in the values, the variable definitions are keys.
Correct. Again, not "forbidden", but generally a bad idea to have whitespace in keys. The only thing that would be fatally bad in a key is an = sign.

Really bad:
One=Two=0
stangowner
Posts: 41
Joined: October 6th, 2012, 12:27 pm

Re: Plugin for HWiNFO

Post by stangowner »

Got it. OK, let me play with it and see what I can get.

Agreed with your earlier comment.....it will dump 100+ variables to the .inc file. And users won't clean it....haha. But if that's not a big deal, then it should be fine. I suppose these are just read once at skin load and stored in memory?

Giving my disclaimer now......no hardware is standard and these names are NOT guaranteed to be there or be consistent. But if it gets us 90% fairly reliably for the skin dev & end user, then I'm fine with it. Just know now it is not foolproof and not a full replacement for skin config by the end user.
User avatar
jsmorley
Developer
Posts: 21024
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Plugin for HWiNFO

Post by jsmorley »

stangowner wrote:Got it. OK, let me play with it and see what I can get.

Agreed with your earlier comment.....it will dump 100+ variables to the .inc file. And users won't clean it....haha. But if that's not a big deal, then it should be fine. I suppose these are just read once at skin load and stored in memory?

Giving my disclaimer now......no hardware is standard and these names are NOT guaranteed to be there or be consistent. But if it gets us 90% fairly reliably for the skin dev & end user, then I'm fine with it. Just know now it is not foolproof and not a full replacement for skin config by the end user.
Right, the variables are read once and carted around in memory. The amount of memory used by 100+ variables will be trivial in the grand scheme of things.

I would expect (ok, hope) that the skin "author" would do the clean up, since there will have to be a "measure" for each and one or more "meters" to display it, so there is presumably some "known" number of variables that are required.
User avatar
raiguard
Posts: 662
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: Plugin for HWiNFO

Post by raiguard »

My plan was (with the JSON idea) that I would get the information, parse it into a LUA table, then use a variety of string matching to find the values I need and write those into the variables. I don’t really need to do that if he writes it into an INC file, but I could do it anyway to only get the values I need, copy those into my settings file, then leave the rest alone. This could also be used to account for slightly different sensor names on different systems.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017