The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > Road Runner > RR Plugins

Reply
 
Thread Tools Display Modes
Old 02-12-2007, 07:36 AM   #1
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Gmail - New Email Count - Label & Indicator

The W3bMa5t3r's Gmail New Email Counter and Indicator

Ok this is a very simple program I wrote over the weekend. It does require an Internet connection, but that's a given since you're checking the status of your email account. Oh and this uses Internet Explorer (behind the scenes), so yeah, that's required too.

This program will create a label "CUSTOM_GMAILCOUNT" that displays the current count of new emails in your account, and an indicator "CUSTOM_NEW_GMAIL" which will allow you to show an icon when there are new messages.

STOLEN FROM MY SKIN:

Code:
Label Code L,381,501,30,20,255,255,255,10,"Arial:B","CUSTOM_GMAILCOUNT","RIGHT" Indicator Code I,411,492,30,32,"CUSTOM_NEW_GMAIL"

You must edit the "config.ini" file to enter your Gmail username and password.
For slower systems or who need to save bandwidth, you can set the polling speed in the "config.ini" file. Value is in Milliseconds, 1000 = 1 Second. Set the "pause_key=" variable in "config.ini" to set your own hotkey. The "config.ini" file needs to stay with the "GmailCount.exe" program for proper operation.

As far as use goes, you can have it load from the "Command to execute" in RoadRunner config, by a button using the "RUN;GmailCount.exe" code, or whatever else floats your boat and works for you. Also, if you just run this program, it will start RoadRunner for you, but if you already have a preconfigured startup for your RoadRunner setup you might not want to do it that way... so it's up to you

Oh and since it had been mentioned before, best I can tell, that even though this is constantly running, there is a very low cpu hit.

Here's a screenshot of the count and indicator working in my newest skin.



Let me know if you encounter any errors or would like something changed/add/etc...

Cheers,
The W3bMa5t3r

-=[ GET IT HERE ]=-

VERSION 1.3
  • Fixed the code because if emails were read, the indicator wouldn't go away.
  • Added a function to refresh the count faster than what the web page would by itself.
  • Added an additional line in the "config.ini" file to set the polling speed. Useful for slower systems or those needing to conserve bandwidth. Set in Milliseconds, 1000 = 1 Second
  • Added tray icons that also change status if there are new emails or not.
  • Allowed decompiling of code for those who wish to see the code.
VERSION 1.4
  • Added a quick ping at the beginning of the program as I noticed that sometimes it wasn't working on my system if I rebuilt the program and for some reason the firewall wouldn't notify me that GmailCount.exe was trying to get through. This ping ensures it does.
  • Created program icon so it's somewhat distinguishable from other AutoIt programs.
VERSION 1.5
  • Added a Global Hotkey so you can pause the program if you're needing to type, as the way this program functions, it temporarily steals focus as it updates. The default is "^!p" (Ctrl+Alt+P). Set the "pause_key=" variable in "config.ini" to set your own hotkey.
  • Added an additional trayicon that displays a paused state while the program is paused. Clears once you've resumed the program.

Last edited by W3bMa5t3r : 03-24-2007 at 08:46 PM.
W3bMa5t3r is offline   Reply With Quote
Sponsored Links
Old 02-12-2007, 08:33 AM   #2
Variable Bitrate
Pistolen08's CarPC Specs
 
Pistolen08's Avatar
 
Join Date: May 2005
Location: Tampabay, Florida
Vehicle: 2002/Acura/RSX/Silver
Posts: 256
My Photos: (3)
great work, thank you!
Pistolen08 is offline   Reply With Quote
Old 02-12-2007, 09:06 AM   #3
MySQL Error
Sonicxtacy02's CarPC Specs
 
Sonicxtacy02's Avatar
 
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,358
My Photos: (97)
this isnt working for me steve. I'm not gettin any errors but i have new mail in my gmails account but neither the label (CUSTOM_GMAILCOUNT) or indicator (CUSTOM_NEW_GMAIL) are showing up. I tried in flash and non flash skins. the username needs to be just the prefix of the email account or is the the full email address?
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)

Last edited by Sonicxtacy02 : 02-12-2007 at 09:09 AM.
Sonicxtacy02 is offline   Reply With Quote
Old 02-12-2007, 09:13 AM   #4
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Quote: Originally Posted by Sonicxtacy02 View Post
this isnt working for me steve. I'm not gettin any errors but i have new mail in my gmails account but neither the label (CUSTOM_GMAILCOUNT) or indicator (CUSTOM_NEW_GMAIL) are showing up. I tried in flash and non flash skins. the username needs to be just the prefix of the email account or is the the full email address?

The username is just the prefix of your email account.
i.e.
Code:
DCCARPCS@Gmail.com would be DCCARPCS

If you open IE alone and log into Gmail, are you getting the new email count in the browser titlebar? /edit - got your answer - yes

Last edited by W3bMa5t3r : 02-12-2007 at 09:21 AM.
W3bMa5t3r is offline   Reply With Quote
Old 02-12-2007, 05:52 PM   #5
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Anyone else try this? Results?
W3bMa5t3r is offline   Reply With Quote
Old 02-12-2007, 07:13 PM   #6
Constant Bitrate
 
Join Date: Apr 2006
Posts: 153
My Photos: (0)
Since you dropped me a message about this this weekend I'll give it a run when i get home. Did you fix the problem we were discussing?
1Munkey is offline   Reply With Quote
Old 02-12-2007, 07:14 PM   #7
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Quote: Originally Posted by 1Munkey View Post
Since you dropped me a message about this this weekend I'll give it a run when i get home. Did you fix the problem we were discussing?

Cool thanks and yes I did.
W3bMa5t3r is offline   Reply With Quote
Old 02-12-2007, 09:42 PM   #8
Constant Bitrate
 
Join Date: Apr 2006
Posts: 153
My Photos: (0)
It didn't crash! Haha. Well the first time i tried it it went into a never ending script pause but I think it had something to do with me opening it first, it opening RR and then trying to find my data for the first time. I couldn't replicate the error so I dunno why that happened. Anyways, when I reloaded it I was able to get it to throw up my count and the indicator. Screwing around with my unread messages, it didn't refresh very well. I'm not sure how often you poll and refresh (and I can't check since you put a passphrase to hide from my peering eyes ) but why don't you crank it up a bunch (and I'm talking like every 5-10 seconds) and let's give it a ride.
1Munkey is offline   Reply With Quote
Old 02-12-2007, 09:52 PM   #9
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Quote: Originally Posted by 1Munkey View Post
It didn't crash! Haha. Well the first time i tried it it went into a never ending script pause but I think it had something to do with me opening it first, it opening RR and then trying to find my data for the first time. I couldn't replicate the error so I dunno why that happened. Anyways, when I reloaded it I was able to get it to throw up my count and the indicator. Screwing around with my unread messages, it didn't refresh very well. I'm not sure how often you poll and refresh (and I can't check since you put a passphrase to hide from my peering eyes ) but why don't you crank it up a bunch (and I'm talking like every 5-10 seconds) and let's give it a ride.

Glad it's not crashing on you There aren't any sleep or poll limits, so it's polling as fast as it can read your account and update RR and do it all over again. Now one thing, it's using an IE browser in the background, and the default page refresh for the Gmail Inbox can be kinda slow, so that might be what's holding it up. I'll see about forcing a refresh to make it faster. So far CPU usage is next to nill (at least on my system) so that shouldn't hurt anything.
I didn't passphrase it.. lol somehow I unchecked the allow decompile. I'm about to release an updated version with tray icons, etc... so I'll change that too so you can check out my sloppy work LOL
W3bMa5t3r is offline   Reply With Quote
Old 02-13-2007, 01:34 AM   #10
Constant Bitrate
 
Join Date: Apr 2006
Posts: 153
My Photos: (0)
Awesome. I'd love to see what professional programmers call "sloppy code". We get all self-conscious about our custom apps for custom hardware that run with near zero footprint while I can't count how much crap I've broke throwing things in disguist with "professional" programs.

How has the app been running on your comp? Are you getting it to refresh pretty quick. I've tried a few different scenarios with and without gmail running and can't get any consistency in a reload.

Let me know when you throw out a new release.
1Munkey is offline   Reply With Quote
Sponsored Links
Old 02-13-2007, 03:26 AM   #11
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Version 1.4 Has Been Released - See First Post

Last edited by W3bMa5t3r : 02-13-2007 at 05:22 AM.
W3bMa5t3r is offline   Reply With Quote
Old 02-13-2007, 03:38 AM   #12
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Quote: Originally Posted by 1Munkey View Post
Awesome. I'd love to see what professional programmers call "sloppy code". We get all self-conscious about our custom apps for custom hardware that run with near zero footprint while I can't count how much crap I've broke throwing things in disguist with "professional" programs.

How has the app been running on your comp? Are you getting it to refresh pretty quick. I've tried a few different scenarios with and without gmail running and can't get any consistency in a reload.

Let me know when you throw out a new release.

Professional programmer? hardly. This is my first bit of code that actually interacts with another program. The only other thing I've really built is my own little NetDetect program. And it's actually quite similar to many other programs on this site. lol.

The app is running great now. Updates the count and indicators almost as soon as the email count is changed, up or down or all read. There will be a slight consistency issue as it's reloading the webpage, so if the site is slow, the connect is used by something else, or many other things, it can vary. But with the force reload, it should be more consistent now You don't need Gmail to be running elsewhere, as the program does it in the background.
W3bMa5t3r is offline   Reply With Quote
Old 02-13-2007, 07:58 AM   #13
MySQL Error
Sonicxtacy02's CarPC Specs
 
Sonicxtacy02's Avatar
 
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,358
My Photos: (97)
newest version worked for me.... after about 5 mins. Better late than never tho! Thanks steve
__________________
03 Acura RSX Coupe
a K.I.S.S Flash, VB, and Autoit Programmer
HARDWARE PROGRESS: 90%[/////////-]
SKIN PROGRESS: 90%[/////////-]
Current Project: RRFusion, MovieTimes, RRMail and More!!! :)
Sonicxtacy02 is offline   Reply With Quote
Old 02-13-2007, 08:02 AM   #14
FLAC
W3bMa5t3r's CarPC Specs
 
W3bMa5t3r's Avatar
 
Join Date: Apr 2006
Location: Washington, DC - Alexandria, VA N/W Area - NOVA
Vehicle: 98 Cobra Convertible | 2004 4Runner SR5 V8 4WD
Posts: 1,253
My Photos: (15)
Quote: Originally Posted by Sonicxtacy02 View Post
newest version worked for me.... after about 5 mins. Better late than never tho! Thanks steve

Glad it's working for you now. Any indication as why it's slow to update on your setup? Here at the house I have it setup with 0 for the polling. It's updating as fast as the page can reload. How's it look on your cpu processes?
W3bMa5t3r is offline   Reply With Quote
Old 02-13-2007, 07:17 PM   #15
Constant Bitrate
 
Join Date: Apr 2006
Posts: 153
My Photos: (0)
The CPU will go between 0-6% usually 0-3% with 6,548K of mem. Can't figure out why it doesn't want to update sometimes. It looks to me like it's running every second but it updates when it wants to. I've also seen the indicator without any number in the label. Haven't seen the label without an indicator though. What version of RR are you running? I'm running the 2/7/07 version.
1Munkey is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Online Indicator as a Label JagPuter Road Runner 4 06-05-2006 08:31 AM


All times are GMT -5. The time now is 10:30 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics