It is currently May 8th, 2024, 12:16 am

Help needed with RegExp(unread emails from gmail)

Get help with creating, editing & fixing problems with skins
Malergh
Posts: 2
Joined: January 27th, 2013, 1:03 am

Help needed with RegExp(unread emails from gmail)

Post by Malergh »

Hi,

This is what I have set up for my gmail preview:

Code: Select all


[MeasureGmail]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=https://xxxx:xxxx@gmail.google.com/gmail/feed/atom
RegExp="(?siU)<fullcount>(.*)</fullcount>.*<title>(.*)</title>.*<summary>(.*)</summary>.*<name>(.*)</name>.*<title>(.*)</title>.*<summary>(.*)</summary>.*<name>(.*)</name>.*<title>(.*)</title>.*<summary>(.*)</summary>.*<name>(.*)</name>"
Codepage=0
Download=1
UpdateRate=60

[MeasureCount]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=1
UpdateRate=1

[MeasureMail1]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
UpdateRate=1
StringIndex=2


[MeasureMail1s]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=3

[MeasureMail1n]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=4

[MeasureMail2]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=5

[MeasureMail2s]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=6

[MeasureMail2n]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=7

[MeasureMail3]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=8

[MeasureMail3s]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=9

[MeasureMail3n]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureGmail]
StringIndex=10


;------------------------------------------------------------------------------------------------
; METERS


[Mail1]
Meter=String
MeasureName=MeasureMail1
FontSize=12
FontColor=255,255,255,255
SolidColor=0,0,0,255
AntiAlias=1
And this works when I have equal to 3 or more unread mails in my gmail account. But when it is 2 or less then the text doesn't show up. There must be a way to fix this but I can't figure it out and can't find anything on google.
Last edited by Malergh on January 27th, 2013, 2:58 am, edited 1 time in total.
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: Help needed with RegExp(unread emails from gmail)

Post by GhostMatrix »

You may want to read this http://docs.rainmeter.net/tips/webparser-lookahead-assertions-in-regexp

Btw UpdateRate= has no effect on child measures of [MeasureGmail]

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

Image
Malergh
Posts: 2
Joined: January 27th, 2013, 1:03 am

Re: Help needed with RegExp(unread emails from gmail)

Post by Malergh »

Ah! Thanks, this is great!