Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A new way to display EMAILS in LCDHype !!!
#1
My provider has lately upgraded all POP accounts to
secure SSL and I eventually lost the features of the
LCDMailbox plugin ! Another disadvantage is that the
LCDMailboxReport.exe executable allocated 24.5 MB
of memory which is far too large.

I have found the excellent freeware PopTray 3.1
(http://www.poptray.org) which supports EVERYTHING
(SSL too via plugin, note dear GMail users) and
I managed to get it work with LCDHype. This is
how I did it.

I wrote a very simple plugin for PopTray that
actually logs three numbers (namely total, unviewed
and new emails) in a text file, every time there is
a mail check from PopTray.

Then I wrote a short script in LCDHype that reads
these numbers :

%DefVar(TotMail,Local=0)
%DefVar(NewMail,Local=0)

then

/Mail/
%Assign(TotMail,%System.ReadFile('C:\Internet\PopTray\LogNumber.txt',0))
%Assign(NewMail,%System.ReadFile('C:\Internet\PopTray\LogNumber.txt',2))
%PrintCenter(%NewMail()' / '%TotMail(),207,238,14)

I didn't read unviewed mails though, only New/Total. Of course
you have to put your local PopTray path in the lines above.

It works perfectly. I am attaching the plugin which has
to be written in the "Plugins" directory of PopTray
and activated in the program.

Hope you like it !

PS. I didn't mess up with shared memory stuff, maybe the god
ViRuStRiNiTy can do better smile.gif smile.gif smile.gif smile.gif


Attached Files
.zip   LogNumber.zip (Size: 23,37 KB / Downloads: 367)
#2
I am displayed as guest but it is me, vpapanik !!! The forum does not remember my cookie (I use firefox) so I forget to log in every time ! smile.gif
#3
This is a far better way to do it. You set MailFreq equal to X
and the mail check will occur every X LCD refreshes (SetPriority time).

/Mail/
%DefVar(MailFreq,Local=10)
%DefVar(MailCnt,Local=%MailFreq())
%DefVar(TotMail,Local=0)
%DefVar(UnrMail,Local=0)




/Mail/
%If(%MailCnt() = %MailFreq()) Then
{
%Assign(MailCnt,0)
%Assign(TotMail,%System.ReadFile('C:\Internet\PopTray\LogNumber.txt',0))
%Assign(UnrMail,%System.ReadFile('C:\Internet\PopTray\LogNumber.txt',1))
}
Else
{
%Assign(MailCnt,%Inc(%MailCnt(),1))
}
%PrintCenter(%UnrMail()' / '%TotMail(),207,238,14)






Here are my print commands as well (specified in the header section) :

/Print(Text,x,y)/
%DefFunc(Print,Local=
%DefVar(Text=%Print->Para0())
%DefVar(x=%Print->Para1())
%DefVar(y=%Print->Para2())
%Format.Offset(Horizontal,%x())
%Format.Offset(Vertical,%y())
%Text()
%Common.CreateNewLine())

/PrintCenter(Text,xL,xR,y)/
%DefFunc(PrintCenter,Local=
%DefVar(Text=%PrintCenter->Para0())
%DefVar(xL=%PrintCenter->Para1())
%DefVar(xR=%PrintCenter->Para2())
%DefVar(y=%PrintCenter->Para3())
%Format.Offset(Horizontal,%Inc(%xL(),%Div(%Dec(%Dec(%xR(),%String.Width(%Text())),%xL()),2)))
%Format.Offset(Vertical,%y())
%Text()
%Common.CreateNewLine())

/PrintLeading(Text,x,y,Length,Char)/
%DefFunc(PrintLeading,Local=
%DefVar(Text=%PrintLeading->Para0())
%DefVar(x=%PrintLeading->Para1())
%DefVar(y=%PrintLeading->Para2())
%DefVar(Length=%PrintLeading->Para3())
%DefVar(Char=%PrintLeading->Para4())
%Format.Offset(Horizontal,%x())
%Format.Offset(Vertical,%y())
%Loop.For(C,%String.Length(%Text()),%Length(),1)
{
%Char()
}
%Text()
%Common.CreateNewLine())


Forum Jump:


Users browsing this thread: 1 Guest(s)