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.
|
02-12-2007, 07:36 AM
|
#1
|
|
FLAC
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
|
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.
|
|
|
02-12-2007, 08:33 AM
|
#2
|
|
Variable Bitrate
Join Date: May 2005
Location: Tampabay, Florida
Vehicle: 2002/Acura/RSX/Silver
Posts: 256
|
great work, thank you!
|
|
|
02-12-2007, 09:06 AM
|
#3
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,358
|
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.
|
|
|
02-12-2007, 09:13 AM
|
#4
|
|
FLAC
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
|
Quote: Originally Posted by Sonicxtacy02 
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.
|
|
|
02-12-2007, 05:52 PM
|
#5
|
|
FLAC
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
|
Anyone else try this? Results?
|
|
|
02-12-2007, 07:13 PM
|
#6
|
|
Constant Bitrate
Join Date: Apr 2006
Posts: 153
|
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?
|
|
|
02-12-2007, 07:14 PM
|
#7
|
|
FLAC
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
|
Quote: Originally Posted by 1Munkey 
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. 
|
|
|
02-12-2007, 09:42 PM
|
#8
|
|
Constant Bitrate
Join Date: Apr 2006
Posts: 153
|
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.
|
|
|
02-12-2007, 09:52 PM
|
#9
|
|
FLAC
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
|
Quote: Originally Posted by 1Munkey 
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 
|
|
|
02-13-2007, 01:34 AM
|
#10
|
|
Constant Bitrate
Join Date: Apr 2006
Posts: 153
|
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.
|
|
|
02-13-2007, 03:26 AM
|
#11
|
|
FLAC
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
|
Version 1.4 Has Been Released - See First Post
Last edited by W3bMa5t3r : 02-13-2007 at 05:22 AM.
|
|
|
02-13-2007, 03:38 AM
|
#12
|
|
FLAC
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
|
Quote: Originally Posted by 1Munkey 
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.
|
|
|
02-13-2007, 07:58 AM
|
#13
|
|
MySQL Error
Join Date: Sep 2004
Location: Woodbridge, VA
Vehicle: 2003/Acura/RSX
Posts: 4,358
|
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!!! :)
|
|
|
02-13-2007, 08:02 AM
|
#14
|
|
FLAC
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
|
Quote: Originally Posted by Sonicxtacy02 
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?
|
|
|
02-13-2007, 07:17 PM
|
#15
|
|
Constant Bitrate
Join Date: Apr 2006
Posts: 153
|
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.
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:30 AM.
|
|