It is currently March 29th, 2024, 11:59 am

RainRGB4.exe help and questions

Get help with creating, editing & fixing problems with skins
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

Yincognito wrote: April 5th, 2020, 3:53 pm It's a good idea. But first you should include the (possibly long) current condition meter - so that you have the reference on which to base the rest of the positions and dimensions, then, as you said, add each of the other meters one at a time.
thanks for the input. your help is much appreciated.
but first my 16 year old asked if i could take him out, i'm teaching him how to drive. :lol:
i'll come back after i have have started and need more help.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: April 5th, 2020, 3:58 pm thanks for the input. your help is much appreciated.
but first my 16 year old asked if i could take him out, i'm teaching him how to drive. :lol:
i'll come back after i have have started and need more help.
Drive safe! :D
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

So i have been able to move the country based on the city growing, but if the name of the city is too long then i get over lap. if i adjust the gap and go back to a shorter city name then i have a big gap.
if someone can offer some help i'll include a zip of what i'm currently working on. please excuse the mess, i find it easier to add a ; to turn things on and off.
link
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: April 5th, 2020, 7:58 pm So i have been able to move the country based on the city growing, but if the name of the city is too long then i get over lap. if i adjust the gap and go back to a shorter city name then i have a big gap.
if someone can offer some help i'll include a zip of what i'm currently working on. please excuse the mess, i find it easier to add a ; to turn things on and off.
link
I lost the previous message in a refresh, so I'm not going to write it again, but instead post the code. Unfortunately, you, my friend, need explanations on why things are like this and not like that in order to understand a little how to deal with Rainmeter code on your own - and pasting the code without the "reasons why" won't help you as much as I'd like. Anyway:

Code: Select all

[Rainmeter]
Update=900
DynamicWindowSize=1
AccurateText=1
;------------for testing alignment
;BackgroundMode=2
;white
;SolidColor=255,255,255,255
;gray
;SolidColor=135,135,135,255
;black
;SolidColor=0,0,0,255
;------------------------------end



[Metadata]
Name=TDW-3.4
Author=HackitZ
Version=3
Information=Parses the Weather.com website JSON data to provide weather information|Right-click and select "Edit Weather Variables" to change settings
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=Feb 20, 2020
made with help from the community, too many people to list. thanks everyone for all the help. you guy's rock!

[Variables]
@Include=#@#Variables.inc
@Include2=#@#WeatherComJSONVariables.inc
@Include3=#@#WeatherComJSONMeasures.inc
@Include4=#@#WeatherComJSONLanguage.inc
@Include5=#@#WeatherComJSONMoon.inc
@Include6=#@#WeatherComJSONPollen.inc
@includeMoonMeasures=#@#Includes\MoonMeasures.inc
MinSkinWidth=300
IconSize=225

;-----------------------URL link to moon phase-------------------

URL=http://www.iohelix.net/moon/moonlite.xml

---Measures---

[MeasureLongString]
Measure=Calc
Formula=(MeterLocationCurrent+1)%2
UpdateDivider=3
;RegExpSubstitute=1
;Substitute="^0$":"A not so long string","^1$":"A very very very very very very very very very very very very very very very very very long string"
DynamicVariables=1

[MeasureGotTheData]
Measure=String
String=[@LocationName]
DynamicVariables=1
IfMatch=^$
IfNotMatchAction=[!HideMeter MeterReticulating][!ShowMeterGroup AllMeters][!Update]

; Overrides a template measure

[NewCurrentTemperature]
Measure=String
Group=Weather
String=[@CurrentTemperature]
DynamicVariables=1
; Note that after some point in the afternoon, there will 
; be NO Low Temperature returned. The High Temperature
; returned will then be the "low" from the current time until
; midnight of the same day.
; This can be tested with: 
IfMatch=^$
IfMatchAction=[!SetOption MeterTodayHighLow Text "Low Tonight %1%2"]
IfNotMatchAction=[!SetOption MeterTodayHighLow Text "%1%2 | %3%4"]

; Meters

[MeterReticulating]
;Measure=String
Meter=String
X=200
Y=80
StringAlign=Center
FontFace=Walkway Expand Black
InlineSetting=Color | 255,255,255,255
InlineSetting2=Size | 23
InlineSetting3=Shadow | 2 | 2 | 3.5 | 10,10,10,230
InlineSetting4=GradientColor | 180 | 0,170,255,255 ; 0.1 | 255,255,255,255 ; 0.9
SolidColor=0,0,0,1
Padding=5,5,5,5
AntiAlias=1
Text=Updating, One Sec ...

[MeterCurrentIcon]
Meter=Image
Group=AllMeters
MeasureName=@CurrentIcon
X=((Max(#MinSkinWidth#,Max([MeterLocationCurrent:W],[MeterCurrentConditions:W]))-[MeterCurrentIcon:W])*0.5)
Y=0
W=#IconSize#
H=#IconSize#
ImagePath=#ImagePath#\WeatherIcons
PreserveAspectRatio=1
ImageAlpha=#IconAlpha#
AntiAlias=1
MouseOverAction=[!SetOption MeterCurrentIcon ImageAlpha 255][!ShowMeterGroup Details3][!UpdateMeter MeterCurrentIcon][!Redraw]
MouseLeaveAction=[!SetOption MeterCurrentIcon ImageAlpha #IconAlpha#][!HideMeterGroup Details3][!UpdateMeter MeterCurrentIcon][!Redraw]
Hidden=1
DynamicVariables=1

[MeterLocationCurrent]
MeasureName=@LocationName
MeasureName2=@LocationCountry
Meter=String
Group=AllMeters
X=(Max(#MinSkinWidth#,Max([MeterLocationCurrent:W],[MeterCurrentConditions:W]))*0.5)
Y=20
H=30
FontFace=Walkway UltraBold
InlineSetting=Color | #Location#
InlineSetting2=Size | 18
InlineSetting3=Shadow | 2 | 2 | 3.5 | 10,10,10,230
InlineSetting4=Italic
StringAlign=Center
AntiAlias=1
ClipString=2
LeftMouseUpAction=!Execute ["https://weather.com/#Language#/weather/today/l/#LocationCode#"]
Text="%1, %2"
Hidden=1
DynamicVariables=1

[MeterCurrentConditions]
MeasureName=@CurrentConditions
Meter=String
Group=AllMeters
X=(Max(#MinSkinWidth#,Max([MeterLocationCurrent:W],[MeterCurrentConditions:W]))*0.5)
Y=0R
H=30
FontFace=Walkway UltraBold
InlineSetting=Color | #Location#
InlineSetting2=Size | 18
InlineSetting3=Shadow | 2 | 2 | 3.5 | 10,10,10,230
InlineSetting4=Italic
StringAlign=Center
AntiAlias=1
ClipString=2
Hidden=1
DynamicVariables=1
There were a lot of things I wrote in my lost message, so if you don't understand things, just ask.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

Yincognito wrote: April 6th, 2020, 1:31 am you, my friend, need explanations on why things are like this and not like that in order to understand a little how to deal with Rainmeter code on your own - and pasting the code without the "reasons why" won't help you as much as I'd like. Anyway:
You are right on the money, just when i think i'm starting to understand. I realize i don't.
i have to go to work, but before i start i'm going to compare what i did to what you posted and explain what i see is happening before i continue.
I appreciate the time your taking to help.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

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
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

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.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Hackit
Posts: 85
Joined: May 19th, 2010, 9:05 pm
Location: North of the Border

Re: RainRGB4.exe help and questions

Post by Hackit »

Yincognito wrote: April 8th, 2020, 6:21 pm
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.
Your patience are to be commended, i hope you are some kind of teacher/mentor to others. having that much patience is a gift.
I am stubborn, i tend to jump both feet in and make it work. this has proved to work in most areas of my life. i do now code is not one of those things. i'm not sure if i'll ever fully get it, but i'll always try.
i get the idea of coming back to something after a few days, and taking the first bit of time to catch back up. as i was in an accident 16 years ago and kind of lost my ability to remember and learn new things (actually have a hole in my head LOL). in return this causes me to read things 50 times to get something to stick.
I can't explain how grateful i am for your help and patience, so let me again say thank you.

I think i'm done for a while as i have the skin setup the way i want. but i'm sure i'll be back in the future.
great community guy's, thanks to everyone for the help.
“Whether you think you can, or you think you can't – you're right”

DeviantArt Profile
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: RainRGB4.exe help and questions

Post by Yincognito »

Hackit wrote: April 8th, 2020, 8:28 pmYour patience are to be commended, i hope you are some kind of teacher/mentor to others. having that much patience is a gift.
Nah, I can have more patience than that. That was just me being direct, that's all. Don't worry about accidents and the problems you have, I also have some friends with quite similar problems that I helped use stuff on computers (not Rainmeter, but other) and they are now doing things mostly on their own - and I'm proud of them. I can do explaining forever actually, my only issues is that the "student" has to have a base of some kind (the minimal "foundation" I talked about), and that I must foresee a positive potential result out of it (i.e. a successful finality) because I don't like to do things without an effect of some kind.

Until next time - take care. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth