It is currently April 20th, 2024, 3:20 pm

How To Get Data From Server

Get help with creating, editing & fixing problems with skins
undefined
Posts: 5
Joined: June 13th, 2022, 7:44 am

How To Get Data From Server

Post by undefined »

Hi, I'm New to Rainmeter. I Want Make A Skin That Show Random Fact From Anime. The Data is From My Own Server (localhost).
The Problem Is: I Don\'t Know How To Show The Data.

My Code:

Code: Select all

[Variables]
FontColor=64, 64, 64
FontColor2=94, 94, 94
FontName=GeosansLight
FontName2=segoe wp semibold
FontSize=10

[MeasureSite]
Measure=WebParser
URL=http://localhost:3333/shikimori
RegExp=(?siU)<p.*>(.*)</p>
Debug=2

[MeasureIP]
Measure=Plugin
URL=[MeasureSite]
StringIndex=1

[MeterIP]
Meter=String
MeasureName=MeasureIP
FontSize=#FontSize#
FontColor=#FontColor2#
FontFace=segoe ui variable display
FontWeight=700
AntiAlias=1
ClipString=2
ClipStringW=500
ClipStringh=100
HTML Data:

Code: Select all

<!DOCTYPE html>
<head>
    <title>Random Fact Desktop</title>
</head>
<body>
    <p>Her friends call her Mi-chon (みっちょん, Mitchon, anime:Micchon), and Izumi&#39;s parents call her Mi-chan (みーちゃん, Mi ̄-chan).</p>
</body>
</html>
When I Try With RainRegExp, It's Shows The Data Correct. (RegExp: (?siU)<p.*>(.*)</p>)

Image

But The Skin Shows "0" Instead of The Data Like RainRegExp

Image

Thank You.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How To Get Data From Server

Post by ikarus1969 »

On MeasureIP you should code Measure=WebParser instead of Measure=Plugin. Could you try this please?

Code: Select all

[MeasureIP]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
undefined
Posts: 5
Joined: June 13th, 2022, 7:44 am

Re: How To Get Data From Server

Post by undefined »

ikarus1969 wrote: June 13th, 2022, 9:58 am On MeasureIP you should code Measure=WebParser instead of Measure=Plugin. Could you try this please?

Code: Select all

[MeasureIP]
Measure=WebParser
URL=[MeasureSite]
StringIndex=1
Dosen't Show Anything. It's Just Blank.
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How To Get Data From Server

Post by ikarus1969 »

Can you show a screenshot of the log-window (right-click on the tray-icon, select about and then the 2nd tab "Skins". There select your skin. Then post the window please. It could be that there are errors displayed there.

the log-window should be something similar to this:
Screenshot RM.png
You do not have the required permissions to view the files attached to this post.
undefined
Posts: 5
Joined: June 13th, 2022, 7:44 am

Re: How To Get Data From Server

Post by undefined »

ikarus1969 wrote: June 13th, 2022, 1:52 pm Can you show a screenshot of the log-window (right-click on the tray-icon, select about and then the 2nd tab "Skins". There select your skin. Then post the window please. It could be that there are errors displayed there.

the log-window should be something similar to this:
Screenshot RM.png
Here
Image
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How To Get Data From Server

Post by ikarus1969 »

So everything looks fine - at the moment i can not understand why the meter doesn't show the text from the MeasureIP...
maybe stupid question: is the FontColor the same as your background color?
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How To Get Data From Server

Post by ikarus1969 »

Aaaah, try to add DynamicVariables=1 to your meter
undefined
Posts: 5
Joined: June 13th, 2022, 7:44 am

Re: How To Get Data From Server

Post by undefined »

ikarus1969 wrote: June 13th, 2022, 2:59 pm So everything looks fine - at the moment i can not understand why the meter doesn't show the text from the MeasureIP...
maybe stupid question: is the FontColor the same as your background color?
Aye ikarus1969, i think i solve the problem. so i search up on internet for "Rainmeter Meter dosent show data" and i see post from Matth asking for "Measure not showing"

And Answer From jsmorley to adding this two Line To Code, My Skin Shows Perfectly.
[Rainmeter]
DynamicWindowSize=1
AccurateText=1
https://forum.rainmeter.net/viewtopic.php?t=26231
undefined
Posts: 5
Joined: June 13th, 2022, 7:44 am

Re: How To Get Data From Server

Post by undefined »

ikarus1969 wrote: June 13th, 2022, 3:01 pm Aaaah, try to add DynamicVariables=1 to your meter
Yes, Thank You So Much For The Help! :thumbup:
User avatar
ikarus1969
Posts: 571
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: How To Get Data From Server

Post by ikarus1969 »

Glad that you've resolved it by yourself! That's where we can learn most.