It is currently April 16th, 2024, 11:33 am

Can anyone help me figure out why variables arent displaying

Get help with creating, editing & fixing problems with skins
LooseAllTheMonies
Posts: 14
Joined: July 29th, 2021, 6:52 am

Can anyone help me figure out why variables arent displaying

Post by LooseAllTheMonies »

So I started dabbling in making my own skins and I can't figure out why this code will not show the additional two meters besides the one named base

Code: Select all

[Rainmeter]
Update=9999999
AccurateText=1
DynamicWindowSize=1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>

[MeasureLat]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=1

[MeasureLong]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=2

[Base]
Meter=String
MeterStyle=MeterStyles
Text=Test

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat
Y=20

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
Y=40
Also another question - I have another skin i am playing around with in the same folder as this one however whenever i load one it just replaces the other. Any reason for this?

Figure Ill just ask everything here- is there anyway to control a chrome tab from within rainmeter? For instance controlling a tab playing a YouTube video?

I tried searching for all these questions however information seems to be sparse.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can anyone help me figure out why variables arent displaying

Post by death.crafter »

LooseAllTheMonies wrote: July 29th, 2021, 6:59 am So I started dabbling in making my own skins and I can't figure out why this code will not show the additional two meters besides the one named base

Code: Select all

[Rainmeter]
Update=9999999
AccurateText=1
DynamicWindowSize=1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>

[MeasureLat]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=1

[MeasureLong]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=2

[Base]
Meter=String
MeterStyle=MeterStyles
Text=Test

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat
Y=20

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
Y=40
Also another question - I have another skin i am playing around with in the same folder as this one however whenever i load one it just replaces the other. Any reason for this?

Figure Ill just ask everything here- is there anyway to control a chrome tab from within rainmeter? For instance controlling a tab playing a YouTube video?

I tried searching for all these questions however information seems to be sparse.
1. It can be so that your measures are returning an empty string.

2. Not really. If you can do so from command line(which I very much doubt I'd not possible) then may be.

P.S. If you want specifically YouTube you can look for WebNowPlaying plugin by thjrulz.
from the Realm of Death
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Can anyone help me figure out why variables arent displaying

Post by CodeCode »

LooseAllTheMonies wrote: July 29th, 2021, 6:59 am So I started dabbling in making my own skins and I can't figure out why this code will not show the additional two meters besides the one named base

Code: Select all

[Rainmeter]
Update=9999999
AccurateText=1
DynamicWindowSize=1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>

[MeasureLat]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=1

[MeasureLong]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=2

[Base]
Meter=String
MeterStyle=MeterStyles
Text=Test

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat
Y=20

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
Y=40
Also another question - I have another skin i am playing around with in the same folder as this one however whenever i load one it just replaces the other. Any reason for this?

Figure Ill just ask everything here- is there anyway to control a chrome tab from within rainmeter? For instance controlling a tab playing a YouTube video?

I tried searching for all these questions however information seems to be sparse.
Firstly, try the below code and note tha small changes I made, in ...Base / ...Lat / ...Lon meters.

Code: Select all

[Rainmeter]
Update=9999999
AccurateText=1
DynamicWindowSize=1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>

[MeasureLat]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=1

[MeasureLong]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=2

[Base]
Meter=String
MeterStyle=MeterStyles
Text=Test
Y=0
X=0

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat
Y=r
X=20r

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
Y=r
X=20r
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can anyone help me figure out why variables arent displaying

Post by death.crafter »

CodeCode wrote: July 29th, 2021, 7:09 am

Code: Select all

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat
Y=r
X=20r

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
Y=r
X=20r
Your changes are cursed lol. (And yes it doesn't work because of the things mentioned below)
Screenshot 2021-07-29 133735.png

The problem is that he has an
Update=99999999999999999999999999999999999999999999999...................................

After the data is parsed form the website, the meters need to be updated.

So,
LooseAllTheMonies wrote: July 29th, 2021, 6:59 am

Code: Select all

[Rainmeter]
Update=-1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border
Group=LatLong

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>
FinishAction=[!UpdateMeterGroup LatLong][!Redraw]

; the above FinishAction updates the meter group LatLong (defined in meterstyles, so contains Base, MeterLat, MeterLong) after the website is downloaded, and redraws. You need it because you have Update=-1.
is all you need. And yes, when you don't need to update the skin use Update=-1
and not
Update=99999999999999999999999999999999999999999999999999..................................................
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Can anyone help me figure out why variables arent displaying

Post by CodeCode »

death.crafter wrote: July 29th, 2021, 8:14 am Your changes are cursed lol.
then i was only partially cursed. at least they are on the same horizontal.

make the X option equal 45 or whatever looks good.

Code: Select all

x=45r
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
death.crafter
Rainmeter Sage
Posts: 1399
Joined: April 24th, 2021, 8:13 pm

Re: Can anyone help me figure out why variables arent displaying

Post by death.crafter »

CodeCode wrote: July 29th, 2021, 11:49 am then i was only partially cursed. at least they are on the same horizontal.

make the X option equal 45 or whatever looks good.

Code: Select all

x=45r
R exists :Whistle
from the Realm of Death
User avatar
CodeCode
Posts: 1365
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Can anyone help me figure out why variables arent displaying

Post by CodeCode »

death.crafter wrote: July 29th, 2021, 11:55 am R exists :Whistle
Yes that is handy for when strings vary in length. 5R is decent space between strings, but the numerical value is added to the R-elative position. and 'r' sets a fixed X or Y location in the skin, from the upper left corner.

The OP isnt popping in.... I wonder what this will all look like to them? :oops:
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
Yincognito
Rainmeter Sage
Posts: 7118
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can anyone help me figure out why variables arent displaying

Post by Yincognito »

LooseAllTheMonies wrote: July 29th, 2021, 6:59 am So I started dabbling in making my own skins and I can't figure out why this code will not show the additional two meters besides the one named base
CodeCode wrote: July 29th, 2021, 12:31 pmThe OP isnt popping in.... I wonder what this will all look like to them? :oops:
In case you're right (which you might very well be), the complete code based on the replies so far:

Code: Select all

[Rainmeter]
Update=-1
AccurateText=1
DynamicWindowSize=1

[MeterStyles]
AntiAlias=1
FontFace=Segoe UI
FontColor=255,255,255,255
FontSize=20
StringEffect=Border
Group=LatLong
X=0r
Y=0R

[GeoLocSite]
Measure=WebParser
URL=https://www.ip-lookup.org/location
RegExp=(?siU) Latitude: (.*)<br /> Longtitude: (.*)</li>
FinishAction=[!UpdateMeterGroup LatLong][!Redraw]

[MeasureLat]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=1

[MeasureLong]
Measure=WebParser
URL=[GeoLocSite]
StringIndex=2

[Base]
Meter=String
MeterStyle=MeterStyles
X=0
Y=0
Text=Test

[MeterLat]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLat

[MeterLong]
Meter=String
MeterStyle=MeterStyles
MeasureName=MeasureLong
So, to recap:
- you needed to update and redraw the meters after the [GeoLocSite] measure got its data (this is not instantaneous as you probably realize, so it's needed even more in this case), just like death.crafter said
- I added X=0r and Y=0R to [MeterStyles] so all the meters using it will be placed under the previous one ([Base] is the exception here, since it's the first, acting like a "static reference point") - you can read more here
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
LooseAllTheMonies
Posts: 14
Joined: July 29th, 2021, 6:52 am

Re: Can anyone help me figure out why variables arent displaying

Post by LooseAllTheMonies »

Hey everyone thanks for all the help I really appreciate it!
CodeCode wrote: July 29th, 2021, 12:31 pm The OP isnt popping in.... I wonder what this will all look like to them? :oops:
Yea I stayed up all night trying to figure out why my skin wasn't working and just woke up to a bunch of replies - which is a pleasant surprise. Sometimes when you ask for help you don't get an immediate response but here I have multiple people helping so thank you all!

So now if anyone could help in clarifying something for me, how do we define meters to be part of a group? I see the addition of

Code: Select all

Group=LatLong
then

Code: Select all

FinishAction=[!UpdateMeterGroup LatLong][!Redraw]
But don't understand how the meters know they are part of the group and should be updated? Is it because they inherit the group from the MeterStyle?

Also, how does the following work?

Code: Select all

X=0r
Y=0R
If it was Y=20R that would make sense to me because any meter that used this style would be offset 20 from the previous one in the Y direction but here it is 0 and also X uses 0r but none of the meters seem to offset in the x direction. This leads me believe lowercase r means stay relative to 0 in the X direction and capital R means relative in a different sense, but cant figure out what exactly, is that correct?

Again thank you everyone for all the help!
User avatar
Yincognito
Rainmeter Sage
Posts: 7118
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Can anyone help me figure out why variables arent displaying

Post by Yincognito »

LooseAllTheMonies wrote: July 29th, 2021, 4:35 pmBut don't understand how the meters know they are part of the group and should be updated? Is it because they inherit the group from the MeterStyle?
Precisely. In a way, groups and meter styles are similar in the sense that both can be "assigned" to multiple meters, making handling a large number of meters easier.
LooseAllTheMonies wrote: July 29th, 2021, 4:35 pmAlso, how does the following work?

Code: Select all

X=0r
Y=0R
If it was Y=20R that would make sense to me because any meter that used this style would be offset 20 from the previous one in the Y direction but here it is 0 and also X uses 0r but none of the meters seem to offset in the x direction. This leads me believe lowercase r means stay relative to 0 in the X direction and capital R means relative in a different sense, but cant figure out what exactly, is that correct?
Well, I mentioned that you can read more here earlier, didn't I? :D That was a link, the idea was to read what's written there (just the orange section, so no more than 10 lines), because it's explained really well:
Relative positioning: If the value is appended with r, the position is relative to the top/left edge of the previous meter. If the value is appended with R, the position is relative to the bottom/right edge of the previous meter.
So, it has nothing to do with whether you apply it horizontally or vertically, just with the various coordinates of a preceding meter and the offset at which the current meter is positioned related to that. Basically:
- a meter is "anchored" to a point (which has coordinates), being positioned relative to that point - think of it like a "reference" (most of the times, that anchor point is the top-left corner of the meter, but for string meters it also depends on their alignment)
- in Rainmeter's relative positioning, r means the offset I mentioned above is added to the preceding meter's corresponding anchor coordinate, while R means that the offset is aded to the coordinates of [anchor+the preceding meter's corresponding dimension]

In other words:
- the X=0r means the X of the current meter will be the same as the X of the preceding meter (offset is 0, and since the preceding meter anchor is its top-left point due to "standard" alignment, offset is added to its X)
- the Y=0R means that the Y of the current meter will be the Y of the preceding meter's anchor (its top, since it's all about Y now) PLUS its height (again, since it's Y we talk about now, the vertical dimension is considered) - in other words it will be right under it, since coordinates in Rainmeter have their 0,0 "origin point" at the top-left corner of the active skin (i.e. the lower we get, the greater the Y value)

Hopefully you'll understand my explanation. If you don't, feel free to ask for clarification. ;-)
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth