This is really cool! I gave it a go and I really like how it works so far. Some neat features to add would be a right click menu on the taskbar icon for things like "Check Mail", "Exit", "Read Messages", and "Send Mail" (if you add that ability).
I know that you probably use the DOS window for debugging etc, but you may want to include a way to kill that when running your program. I found a quick way to do this somewhere (sorry I don't remember, this isn't mine) - basically create a file called 'start.pl' and use this snippet of code:
use Win32;
use Win32::Process;
Win32::Process::Create($Win32::Process::Create::ProcessObj,
'C:/perl/bin/perl.exe',
'perl traymail.pl',
0,
DETACHED_PROCESS,
".") or die print_error();
sub print_error() {
return Win32::FormatMessage(Win32::GetLastError() );
}
You could probably clean that up a lot (like checking for perl install path etc), but it will do the trick for most default installations. But you need a way to exit your program before you add this =) (I tried it and it worked, I just had to kill perl.exe in the task manager to exit your application).
Just for fun, I also tried Perl2exe on traymail using the '-gui' option and that works as well (you need the registered version of Perl2exe to use the -gui option I beleive). To exit, I just killed the 'traymail.exe' app in task manager.
Keep up the cool work LupoX! ++
djw
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.