Hackit wrote: ↑April 8th, 2020, 4:54 pm
just found a chance to look at the differences, wow i was way off.
so i can see it's starts with the current icon meter, so i see that every new meter that is added, i need to add the new meter name.
ex; X=0((Max(#MinSkinWidth#,Max([MeterLocationCurrent:W],[MeterCurrentConditions:W],[newmeter]))-[MeterCurrentIcon:W])*0.5)
i see that the brackets allow #MinSkinWidth#,Max and [MeterCurrentIcon:W] to be controling?(controlling is the wrong word i know) all the other meters in the inner brackets, ([MeterLocationCurrent:W],[MeterCurrentConditions:W],[newmeter])
now i see you have all the StringAlign=Center, i have changed the [MeterLocationCurrent:W],[MeterCurrentConditions:W] to the left and it seems fine, is this going to cause an issue? i thought i read that i (forget what i thought it was most likely wrong)
i also added a value before the string and after the x to adjust the meter position, is this the correct way to adjust the meters?
also at the end of the string is *0.5, does the asterisk represent multiply? if so does /2 mean divide by 2? (not sure i would need to use /2, just asking.
tnx
Oh boy, I don't even know where to begin here, LOL. I like the fact that you hang on to trying and do something, but there are just basic things that you don't know, and that are already known even by someone who didn't saw a piece of Rainmeter code in his life. I'm going to be honest and direct with you: it's like teaching someone to read when he doesn't even know what letters are.
Secondly, I know everybody has a life outside Rainmeter, but long breaks between related posts are not helping. This is because I also do other things in the meantime and if you ask me after what I did in a code that I wrote 2-3 days ago, I'm going to say "well, erm ... I don't recall exactly, let me remember a little what the heck I wanted to do there and there 3 days ago, LMAO".
But ok, let's start (again) with the basics:
-
X=0((Max(#MinSkinWidth#,Max([MeterLocationCurrent:W],[MeterCurrentConditions:W],[newmeter]))-[MeterCurrentIcon:W])*0.5) Red is wrong. No, forget about it, red is
seriously wrong:
a) first, you just
don't add a 0 or a 12 before some formula expecting to mean something, that will not only do anything you want to, but break your entire result - so, don't do it
b) in Rainmeter, the
Max() formula takes only 2 parameters, so this means you can't do Max(2,5,3), but you can workaround this by doing Max(Max(2,5),3), or Max(2,Max(5,3)), basically taking just 2 of those parameters at a time. It's a pain in the arse, but that's how it is.
- for what the signs represent, check the
Formulas page in the Rainmeter manual. Use the manual first when you don't know something, then if you still don't understand, ask.
Now on the positioning and what those formulas for the X-es mean. Brackets don't "control" anything, they
enclose parts of the formulas you want to be treated with a priority - like (2+5)*3 meaning that the addition will be done before the multiplication, even though normally the multiplication is prioritized in arithmetic operations - or they enclose the parameters of a function - like Max(2,5) meaning maximum between 2 and 5, aka 5.
Changing StringAlign from Center to Left
will change how things are done, even though you don't seem to notice any (visual) effect in this case. This is because when StringAlign is Left, X is the left edge / margin / side of the string's "frame" and it's this that will be taken as reference and basis for positioning, while Center means that the string will be placed half at the left of X and half at the right of X. Basically, the X position in relation to the string changes drastically. Likewise, Right means that X is the right edge of the string. More on this
here.
That being said, if you not only changed the [MeterLocationCurrent] and [MeterCurrentConditions] (
not [MeterLocationCurrent:W],[MeterCurrentConditions:W], as those are not the actual meters, but their Widths - hence the :W after the name of the meters) to be Left aligned, but also the 0.5 multiplication factor to something like 0.0 or 0.25, then you did nothing wrong.
In the end, I think it will be pointless to explain the meaning of those Max() formulas, because I have the feeling that you won't take advantage of that the way it's supposed to (or further add some wrong numbers before or after some string in the hope it will have an effect), so maybe it would be better to just experiment starting from the code posted and hopefully you'll manage to make something out of it. Again, I really do appreciate the fact that you keep trying, and you have my respect for this, but it's not that there are things you don't understand yet, but there are
basic things that you don't. You will eventually, I think, but this (current) fact makes it very hard to explain things properly, as you still miss a good part of the "foundation" to understand the more "advanced" stuff.