It is currently April 20th, 2024, 3:24 am
Get help with creating, editing & fixing problems with skins
50l3r
Posts: 24 Joined: August 19th, 2015, 6:11 pm
Post
by 50l3r » September 21st, 2018, 1:07 pm
Hi guys,
I made a script who takes the real time analytics in my site
I cant take the number of visits:
Code: Select all
<html><head></head><body><item>0</item></body></html>
Code: Select all
[MeasureSite]
Measure=Plugin
Plugin=WebParser
Url=http://rainmeter.loc
RegExp=(?siU)<item>(.*)</item>
Debug=2
[MeasureParser]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=1
[MeterChild1]
MeasureName=MeasureParser
Meter=STRING
X=250
Y=0
FontColor=#FFF
FontSize=55
FontFace=BigNoodleTooOblique
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1
Any ideas?
rainmeter.loc domain is my local virtual host
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 21st, 2018, 1:15 pm
Look right. What are you getting in the About / Log?
balala
Rainmeter Sage
Posts: 16147 Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania
Post
by balala » September 21st, 2018, 2:17 pm
If I copy the posted html code into a file and link that file to the URL option of the [MeasureSite] measure, it does work well. However the posted URL isn't accessible to us (me?). But the code works, so if you can access the address, it should have to work. Can you open the address in your browser?
50l3r
Posts: 24 Joined: August 19th, 2015, 6:11 pm
Post
by 50l3r » September 21st, 2018, 2:47 pm
i open the about window:
There are more measures who calculate the font color and blink status:
Code: Select all
[Variables]
@Include=../Variables.inc
[MeasureSite]
Measure=Plugin
Plugin=WebParser
Url=http://rainmeter.loc
RegExp=(?siU)<item>(.*)</item>
Debug=2
[MeasureParser]
Measure=Plugin
Plugin=WebParser
URL=[MeasureSite]
StringIndex=1
[MeasureBlink]
Measure=Calc
Formula=MeasureBlink = 0 ? 255 : 0
[msTint]
Measure=Calc
Formula=1>0 ? -1 : -2
Substitute="-1":"#FontColorStressed#,[MeasureBlink]","-2":"#fff#"
[image]
meter=image
imageName=#ROOTCONFIGPATH#@Resources\Analytics\calltek.png
X=0
Y=0
H=75
[MeterChild1]
MeasureName=MeasureParser
Meter=STRING
X=250
Y=0
FontColor=[msTint]
FontSize=55
FontFace=Open Sans
StringAlign=LEFT
StringStyle=Bold
AntiAlias=1
DynamicVariables=1
if i execute curl
http://rainmeter.loc in cmd i recieve this:
Code: Select all
C:\Users\soler>curl http://rainmeter.loc
<html><head></head><body><item>0</item></body></html>
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 21st, 2018, 2:51 pm
What does About / Log have in it? That would be "Registro" on your system.
I'm not sure I see the problem. That file has "0" in it, and you are getting "0" and the string value returned by WebParser...
50l3r
Posts: 24 Joined: August 19th, 2015, 6:11 pm
Post
by 50l3r » September 21st, 2018, 2:53 pm
This:
The file WebParserDump.txt
Code: Select all
<html><head></head><body><item>1</item></body></html>
Here the skin witouth render the number of visits:
And here the skin with 23 manually typed:
https://i.gyazo.com/386737959bc67000d5a645ff9417250f.png
Last edited by 50l3r on September 21st, 2018, 2:55 pm, edited 1 time in total.
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 21st, 2018, 2:54 pm
I'm not sure I see the problem. That file has "0" in it, and you are getting "0" and the string value returned by WebParser...
Doesn't it return "1" when "1" is in the file?
50l3r
Posts: 24 Joined: August 19th, 2015, 6:11 pm
Post
by 50l3r » September 21st, 2018, 2:57 pm
Nope, i cant see notihing even when i recieve 1 or 0
I try to change the font but nothing
Thats the webpage in chrome:
The rainmeter about:
4.2.0 r3111 64-bit (Jul 8 2018) - Spanish (3082)
Windows 10 Pro 1803 64-bit (build 17134) - Spanish (3082)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\soler\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\soler\AppData\Roaming\Rainmeter\
IniFile: C:\Users\soler\AppData\Roaming\Rainmeter\Rainmeter.ini
jsmorley
Developer
Posts: 22629 Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA
Post
by jsmorley » September 21st, 2018, 3:01 pm
Add a [Rainmeter] section to the top of your skin:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
50l3r
Posts: 24 Joined: August 19th, 2015, 6:11 pm
Post
by 50l3r » September 21st, 2018, 3:04 pm
jsmorley wrote: Add a [Rainmeter] section to the top of your skin:
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
Great!! with DynamicWindowSize=1 it works
But it split the number:
Adding Width (W=200) to Measure it works for me: