It is currently April 19th, 2024, 12:18 am

POP3 and Gmail as one (and a half)

Get help with creating, editing & fixing problems with skins
User avatar
Yelleke
Posts: 73
Joined: September 5th, 2009, 11:38 am
Location: Belgium

POP3 and Gmail as one (and a half)

Post by Yelleke »

Hi,

Mailmeter.dll gives me the total of pop3 mails with a decimal number, like 1.0
Gmail keeps it neat, like 1

Is it possible to lose the .0 as I dont think I could have 1.5 mails
I have tryed: TURNCATE, FLOOR, SEAL, ROUND, etc

Greatings
Yelleke

Code: Select all

[Rainmeter]
Update=1000
Author=Yelleke

;[Variables]======================

[Variables]
MailProgram=C:\Program Files\Mozilla Thunderbird\thunderbird.exe

;Dutch
youhave=U hebt
zero=geen
message=bericht
messages=berichten

;English
;youhave=You Have
;zero=no
;message=message
;messages=messages

;[Styles]========================

[StyleMail]
FontFace=Tahoma
FontSize=8
FontColor=255, 255, 255, 255
StringAlign=Left
StringStyle=NORMAL
NumOfDecimals=0
AntiAlias=1

;[Measures]======================

[POP]
Measure=Plugin
Plugin=Plugins\MailMeter.dll
Server=pop.yourISP.net
Port=110
User=username
Password=password
Timeout=15000
UpdateDivider=900

[URL]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=https://username:password@gmail.google.com/gmail/feed/atom
RegExp="(?siU)<fullcount>(.*)</fullcount>"
Codepage=0
Download=1
UpdateRate=900
StringIndex=1

[Gmail]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[URL]
StringIndex=1
UpdateRate=1

[Total]
Measure=Calc
Formula=ROUND(Gmail+POP)
IfEqualValue="1"
IfEqualAction=!Execute [!RainmeterShowMeter BackGround] [!RainmeterHideMeter MoreMail] [!RainmeterHideMeter NoMail] [!RainmeterShowMeter NewMail] [PLAY C:\Windows\Media\Notify.wav]
IfAboveValue="1"
IfAboveAction=!Execute [!RainmeterShowMeter BackGround] [!RainmeterHideMeter NoMail] [!RainmeterHideMeter NewMail] [!RainmeterShowMeter MoreMail] [PLAY C:\Windows\Media\Notify.wav]
IfEBelowValue="1"
IfBelowAction=!Execute [!RainmeterHideMeter BackGround] [!RainmeterHideMeter NewMail] [!RainmeterHideMeter MoreMail] [!RainmeterShowMeter NoMail]

;[Meters]========================

[BackGround]
Meter=IMAGE
X=0
Y=0
W=110
H=15
Hidden=1
SolidColor=0 ,0 ,0 , 1
LeftMouseUpAction=!execute ["#MailProgram#"]

[NoMail]
Meter=STRING
MeterStyle=StyleMail
Prefix="#youhave# "
Postfix=" #messages#"
Text="#zero#"
X=0
Y=0

[MoreMail]
Meter=STRING
MeasureName=Total
MeterStyle=StyleMail
Prefix="#youhave# "
Postfix=" #messages#"
Hidden=1
X=10r
Y=r

[NewMail]
Meter=STRING
MeasureName=Total
MeterStyle=StyleMail
Prefix="#youhave# "
Postfix=" #message#"
Hidden=1
X=5r
Y=r
User avatar
Chewtoy
Moderator
Posts: 995
Joined: June 10th, 2009, 12:44 pm
Location: Sweden

Re: POP3 and Gmail as one (and a half)

Post by Chewtoy »

Did you use TRUNCATE or was that just a typo in your post?
TRUNC(MeasureName) would be the correct way.
Also add a DynamicVariables=1 as I believe Calc might have a problem with that string return.
I don't think, therefore I'm not.
User avatar
Alex2539
Rainmeter Sage
Posts: 642
Joined: July 19th, 2009, 5:59 am
Location: Montreal, QC, Canada

Re: POP3 and Gmail as one (and a half)

Post by Alex2539 »

Try adding this line to the measure:
Substitute=".0":""
ImageImageImageImage