Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Gmail - New Email Count - Label & Indicator

  1. #1
    FLAC W3bMa5t3r's Avatar
    Join Date
    Apr 2006
    Location
    Washington, DC
    Posts
    1,268

    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.

  2. #2
    Variable Bitrate Pistolen08's Avatar
    Join Date
    May 2005
    Location
    Tampabay, Florida
    Posts
    256
    great work, thank you!

  3. #3
    Mo' Programming Mo' Problems
    Auto Apps:loading...
    Sonicxtacy02's Avatar
    Join Date
    Sep 2004
    Location
    Woodbridge, VA
    Posts
    8,173
    Blog Entries
    53
    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?
    mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
    Find my plugins on the MP3Car App Store!
    Follow Me on Twitter or Facebook
    Live mp3Car Facebook Chat

  4. #4
    FLAC W3bMa5t3r's Avatar
    Join Date
    Apr 2006
    Location
    Washington, DC
    Posts
    1,268
    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:
    [email protected] 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

  5. #5
    FLAC W3bMa5t3r's Avatar
    Join Date
    Apr 2006
    Location
    Washington, DC
    Posts
    1,268
    Anyone else try this? Results?

  6. #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?

  7. #7
    FLAC W3bMa5t3r's Avatar
    Join Date
    Apr 2006
    Location
    Washington, DC
    Posts
    1,268
    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.

  8. #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.

  9. #9
    FLAC W3bMa5t3r's Avatar
    Join Date
    Apr 2006
    Location
    Washington, DC
    Posts
    1,268
    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

  10. #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.

Page 1 of 3 123 LastLast

Similar Threads

  1. Online Indicator as a Label
    By JagPuter in forum Road Runner
    Replies: 4
    Last Post: 06-05-2006, 09:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •