its been a while since i dabbled with rainmeter, but i'd like to make a gmail meter.
But instead of showing a no. of unread emails, i'd like just the text 'mail' to be a different color when i have unread emails.
would this be possible using a calc. ie:
if no. of unread emails is above 1 , setoption color red
if no. of emails is below 1 setoption color green
thx in advance
It is currently May 13th, 2024, 8:36 am
[SOLVED]Gmail calc help needed
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
[SOLVED]Gmail calc help needed
Last edited by dv-ent on June 16th, 2012, 2:50 pm, edited 1 time in total.
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gmail calc help needed
Certainlydv-ent wrote:its been a while since i dabbled with rainmeter, but i'd like to make a gmail meter.
But instead of showing a no. of unread emails, i'd like just the text 'mail' to be a different color when i have unread emails.
would this be possible using a calc. ie:
if no. of unread emails is above 1 , setoption color red
if no. of emails is below 1 setoption color green
thx in advance
Just do exactly as you say, right on the WebParser measure if you want.
IfAboveValue=0
IfAboveAction=!SetOption SomeMeter FontColor 255,0,0,0
IfEqualValue=0
IfEqualAction=!SetOption SomeMeter FontColor 255,255,255,255
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: Gmail calc help needed
so why isnt this working ?
Code: Select all
======================================
GMAIL MEASURES
======================================
[mGmailCheckM]
Measure=Plugin
Plugin=WebParser.dll
Url=https://#GMAILUSERNAME#:#GMAILPASSWORD#@gmail.google.com/gmail/feed/atom
RegExp="(?siU)<fullcount(.*)/fullcount>"
UpdateRate=1800
StringIndex=1
DecodeCharacterReference=0
Substitute=">":"","<":""
IfAboveValue=0
IfAboveAction=!SetOption MeterMI FontColor f45544
IfEqualValue=0
IfEqualAction=!SetOption MeterMI FontColor 255,255,255
======================================
GMAIL METERS
======================================
[MeterMI]
Meter=STRING
MeasureName=mGmailCheckM
MeterStyle=1
X=400
Y=15
Text="MAIL"
LeftMouseUpAction=!Execute ["https://mail.google.com"]
where am i going wrong ?
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gmail calc help needed
WebParser returns a string value, so it might be that we need to put the actions in a Calc measure.
Code: Select all
======================================
GMAIL MEASURES
======================================
[mGmailCheckM]
Measure=Plugin
Plugin=WebParser.dll
Url=https://#GMAILUSERNAME#:#GMAILPASSWORD#@gmail.google.com/gmail/feed/atom
RegExp="(?siU)<fullcount>(.*)</fullcount>"
UpdateRate=1800
StringIndex=1
DecodeCharacterReference=0
[MeasureSetColor]
Measure=Calc
Formula=[mGmailCheckM]
IfAboveValue=0
IfAboveAction=!SetOption MeterMI FontColor f45544
IfEqualValue=0
IfEqualAction=!SetOption MeterMI FontColor 255,255,255
DynamicVariables=1
======================================
GMAIL METERS
======================================
[MeterMI]
Meter=STRING
MeasureName=mGmailCheckM
MeterStyle=1
X=400
Y=15
Text="MAIL"
LeftMouseUpAction=!Execute ["https://mail.google.com"]
-
- Posts: 62
- Joined: November 13th, 2011, 11:43 am
Re: Gmail calc help needed
yup, that'll be why ...told you, its been a while !!
many thx
on a sidenote, will setoption ever be able to incorporate show/hide meter ?
many thx
on a sidenote, will setoption ever be able to incorporate show/hide meter ?
-
- Developer
- Posts: 22632
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Gmail calc help needed
There are no current plans for that. You can use !ShowMeter / !HideMeter instead.dv-ent wrote:yup, that'll be why ...told you, its been a while !!
many thx
on a sidenote, will setoption ever be able to incorporate show/hide meter ?