views:

86

answers:

4

I create a program that simulates me browsing to gmail, entering the user name and password and clicking the submit button.

All this with C#.

I would appreciate two kinds of answers:

  1. One that tells how to do this programaticaly. Since I may be interested in automating more sophisticated user activities.
  2. On that tells me about a program that already does that.

Thanks!!

+2  A: 

I want to access my mail account with a double click (without browsing, entering username and password and pressing submit).

Why not check the 'stay signed in' box, and add a bookmark toolbar item for Gmail?

alt text

Do it once, and all future logins are a one-click process. Am I missing something? Why overcomplicate this with a C# program?

ceejayoz
You have put a very big smile on my face!! And this is not because I mean any disrespect, rather- it's because the real reason I want to do this is because me and my wife use the same computer. So if one of us checks the 'stay signed in'.. you get the drift.Relationships DO complicate things! Amazingly though - some of these complications have technological solutions. Amen :-)
Vitaliy
You could install Firefox, Safari, and Chrome, and set up the two non-default browsers to go to Gmail and be logged into the two accounts. Another option is a desktop client for e-mail, which would allow you to add both accounts to it.
ceejayoz
You can use multiple profiles with Firefox and create a shortcut to go to a specific profile - you can have multiple windows each with its own profile loaded active at the same time. IMAP/POP is another option where you could download from both account and then filter it to a different folder. Alternatively, have both account forward to one account and filter.
nevets1219
A: 

Well, depending on the browser you're using, it might be much simpler to use a greasemonkey userscript (on FireFox) that does auto-login for you.

Assaf Lavie
A: 

If you want to simulate user activity take a look at AutoHotKey.

Also if the issue is specific to logging into websites take a look at LastPass. They have plug-ins for every major browser and mobile device. I haven't type out a user name or password on a website in months.

Eric Anastas
A: 

If your ok with clicking 'go' (or wharever) on your application and then clickingin the username field. Look into Sendkeys:

Put this in the onClick event of a button and replace text with your user details:

SendKeys.Send("[email protected]{TAB}PASS{TAB}{TAB}{ENTER}");

You might also want to put a timer or make your program wait a few seconds before actually sending the keys to give you time to click in the username box.

Chief17