It is currently March 28th, 2024, 10:03 pm

IP Information Skin Project

Skins that don't neatly fit into other categories
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: IP Information Skin Project

Post by jsmorley »

Works great, although I had to put in "United States" where you have "Canada" hard coded in the RegExp. Is there a way to use a variable like Country="United States" and then put #Country# in the REgExp to make it easier for a user wanting to use the skin?
User avatar
GhostMatrix
Rainmeter Sage
Posts: 141
Joined: April 18th, 2009, 8:26 pm
Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5

Re: IP Information Skin Project

Post by GhostMatrix »

Many thanks for reporting this issue!
When I parse a website page I have to be very careful of what I'm doing, especially when it's not for my personal use, and you know after a while I have the RegExp code coming out from my ears! :lol:

O.k replace the Measures part with this one, to see if it will work on your side as well, it should ignore the country name value during the parsing without any manipulation ...

GM

Code: Select all

[Measure_IP_Website]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
Url=#IP#
RegExp="(?siU)<meta http-equiv=Content-Type content="text/html; charset=windows-(.*)">(.*)<span class="pbbbig"><b>My IP Address</b></span>(.*)</tr>(.*)<span class="pb"><b>(.*)</b></span>(.*)</tr>(.*)<span class="pbbbig"><b>(.*)</b></span>(.*)</tr>(.*)<span class="pb"><b>(.*)</b></span><br />(.*)<br />(.*)<span class="pb2"><b><u>(.*)</u>(.*)</u>(.*)</tr>(.*)<span class="pbbbig"><b>(.*)</b></span>(.*)<span class="pb"><b>(.*)<img src='ip/world.small/(.*).png' border='0'>(.*)</b></span><br />(.*)<span class="pb"><b>(.*)<br /></b>(.*)"
StringIndex=1
IfEqualValue=1252
IfEqualAction=!execute [!RainmeterHideMeter Meter_N/A][!RainmeterShowMeter Meter_Flag_Icon]
Debug=1


[Measure_IP]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=5

[Measure_HostName]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=8
Substitute="My Hostname":""

[Measure_Host]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=11

[Measure_Proxy]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=14

[Measure_Country_Text]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=18
Substitute="Country  - Flag -":""

[Measure_Flag_Icon]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=21

[Measure_City]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[Measure_IP_Website]
StringIndex=24
If at first you don't succeed; call it version 0.1

Image
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: IP Information Skin Project

Post by jsmorley »

Yep... Works fine now with no editing needed. Very cool!
User avatar
GhostMatrix
Rainmeter Sage
Posts: 141
Joined: April 18th, 2009, 8:26 pm
Location: Montreal, Quebec, Canada 45.5658°N, 73.5898°W UTC -5

Re: IP Information Skin Project

Post by GhostMatrix »

Yeah ! :D

To the peoples who have try the code in the above post, don't forget to put the debug=1 to 0 in the main Measure.

I have uploaded the version 2 on the first post, you will also found inside the skin folder a text file with the country flags code for the Png images!

GM
If at first you don't succeed; call it version 0.1

Image
User avatar
ULTIMATE2010
Posts: 4
Joined: November 15th, 2009, 2:14 pm

Re: IP Information Skin Project

Post by ULTIMATE2010 »

GhostMatrix wrote:IP Information Skin Project:

Hi folks ! ;)

jsmorley said on an another thread "What would be more fun is .."
Well I always want "Raineers" to have more fun, so right now I'm testing a new IP skin project (Code Name: "I want to know")

Do you want more toys (features) for the default skin ? :P

GM

»Warning: this is just a default codes skin, you will have to put your own country flag Png in the skin folder.«
IP_Address_V2.zip
How do I get this to show my IP?
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: IP Information Skin Project

Post by maminscris »

you have to fix the regexp
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
tru
Posts: 169
Joined: January 12th, 2010, 4:24 am
Location: A Salty Piece of Land...

Re: IP Information Skin Project

Post by tru »

Did the fix but still no work here....
User avatar
maminscris
Posts: 509
Joined: April 24th, 2009, 3:17 pm
Location: Bucharest, Romania Lat 44,43° Lon 26,1°

Re: IP Information Skin Project

Post by maminscris »

tru wrote:Did the fix but still no work here....
did you re-parse the site?
Zero at programing, zero at writing codes, so far 2 at making images
But I'm good at copy/paste, and I not always like this
Image
User avatar
ULTIMATE2010
Posts: 4
Joined: November 15th, 2009, 2:14 pm

Re: IP Information Skin Project

Post by ULTIMATE2010 »

maminscris wrote:you have to fix the regexp
Could you explain if you dont mind?
Appreciated.
User avatar
ULTIMATE2010
Posts: 4
Joined: November 15th, 2009, 2:14 pm

Re: IP Information Skin Project

Post by ULTIMATE2010 »

maminscris wrote: did you re-parse the site?
Sorry.. but I dont understand. More info if possible P L E A S E.
Thank-you