MS Outlook Plugin Beta (v1.2)

MS Outlook Plugin Beta (v1.2)

Postby Kaota » Mon Jan 01, 2007 12:58 am

Hi All,

After some trial and error, I managed to write a somewhat functional plugin to display MS Outlook (not Express) Inbox stats, as well as the three most recent message subjects and dates. See below:
Image

The first 6 characters (HH:MM]) are static, and the rest scrolls.

This is also fully Exchange compatible.

Source files: http://files.radicand.org/PertOutlook-source.zip
Plugin-only files: http://files.radicand.org/PertOutlook-dll.zip

You may need an additional Interop dll, but it worked for me with just the two .dll files I provided. Please let me know if you think you need the extra ones (if the screen is blank).

Please use this thread for comments regarding the plugin. Once I feel it's polished, I'll submit for the CDC.

Releases:
v1.0: Initial Release
v1.1: Added a Configuration dialog (launch from plugin menu) mainly for others to see how to do.
v1.2: Fixed a sorting bug, added update intervals (set in config), and cleaned up some of the source code.

TODO:
- Allow for more than three messages. I suppose this could be achieved by using the "W/S" hotkeys to scroll up and down, but due to the fact that I know people with thousands of items in "Inbox", I'd probably hard-limit it.
- Should it just display unread items?
- Any other stats? Row 4 is kind of lonely.
Last edited by Kaota on Mon Jan 01, 2007 6:34 am, edited 3 times in total.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby mrasmus » Mon Jan 01, 2007 3:28 am

Interval's not too hard -- I'll post code shortly (not on the right computer).
mrasmus
 
Posts: 123
Joined: Tue Dec 26, 2006 12:37 am

Postby Kaota » Mon Jan 01, 2007 3:58 am

Updated with Config dialog (mainly as a tech demo for others).
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby Pokesomi » Mon Jan 01, 2007 4:06 am

Yeah we need the interval setup in the code. Otherwise you have to shut down pertelian and restart it
User avatar
Pokesomi
 
Posts: 90
Joined: Tue Nov 28, 2006 5:02 am
Location: Woodland Hills, CA

Postby mrasmus » Mon Jan 01, 2007 4:25 am

Here's how I did automatic updates:

Firstly, I setup an "Update" method that got the information I needed. To run this periodically I utilize "Timer" from System.Timers. so make sure to add "using System.Timers();. Update needs to be defined a certain way, (Timers calls it with a couple of variables that need to be accepted) but you can call it as Update(null,null) and it should work fine. Here's how Update should be defined:

Code: Select all
public void Update( object source, ElapsedEventArgs e )


Then at the top of the class I declare:

Code: Select all
Timer myTimer;


Then there's setting it up (I do so in Init()):

Code: Select all
myTimer = new Timer();
myTimer.Elapsed += new ElapsedEventHandler(Update);
myTimer.Interval = 60000;  //Time for interval in Milliseconds


Then, when you want it to start happening every interval (60 seconds in the example) you call "myTimer.Start();". When you wish it to stop updating just call "myTimer.Stop();". I put these in OnStart() and OnStop() respectively.

I hope this makes sense, I'm kinda distracted. I'm not saying this is the best way, but it's how I did it in my GamerTag app, which seems to work.
mrasmus
 
Posts: 123
Joined: Tue Dec 26, 2006 12:37 am

Postby Kaota » Mon Jan 01, 2007 6:31 am

Thanks Matt, that snippet helped. Something else I noticed is that the plugin system loops Run() on its own, so I just used the Update() method to update class variables that the stuff in Run() used to write to the LCD. Should reduce load on the system by not querying the Outlook system so often now.

I also cleaned up some code and found a bug related to sorting of messages. v1.2 now.
Kaota
 
Posts: 51
Joined: Mon Dec 25, 2006 8:01 pm

Postby mrasmus » Mon Jan 01, 2007 8:48 am

Glad I could help... yeah, the Run() is basically run constantly, when one thread stops another begins.

--mrasmus
mrasmus
 
Posts: 123
Joined: Tue Dec 26, 2006 12:37 am

Postby pyromjm » Sat Jan 27, 2007 1:30 am

Would it be real hard to make a plugin like this for Outlook express? That would be pretty helpful for a lot of people like me im sure. Keep up the good work
pyromjm
 
Posts: 1
Joined: Sat Jan 27, 2007 1:28 am


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron