943,902 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 571
  • C++ RSS
May 13th, 2009
0

Back End Web Browser Interaction?

Expand Post »
Alright so I'm working with a program that works with various email programs and I'd like to use it to automate the login process. I know I can open a browser using
ShellExecute(NULL, "open", "https://various.email.com/", NULL, NULL, SW_SHOWNORMAL);
but how would I actually parse the login/password strings into the text fields of the browser?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
spectrum6125 is offline Offline
2 posts
since May 2009
May 13th, 2009
-1

Re: Back End Web Browser Interaction?

Just an alternative on the way to open browsers:
C++ Syntax (Toggle Plain Text)
  1. String^ myURL = "http://www.google.com";
  2.  
  3. System::Diagnostics::Process::Start("iexplore.exe", myURL );

I beleive what you have to do is to extract the login and password as two strings and then create a new string (myURL) like this:
C++ Syntax (Toggle Plain Text)
  1. String^ myURL = "http://www.google.com";
  2. String^ mylogin = "abc";
  3. String^ myPassword = "def"
  4.  
  5. //New myURL
  6. myURL = myURL + "/" + myUser + "/" + myPassword;

Hope it helps!


Alright so I'm working with a program that works with various email programs and I'd like to use it to automate the login process. I know I can open a browser using
ShellExecute(NULL, "open", "https://various.email.com/", NULL, NULL, SW_SHOWNORMAL);
but how would I actually parse the login/password strings into the text fields of the browser?
Last edited by Liszt; May 13th, 2009 at 10:39 pm.
Reputation Points: 33
Solved Threads: 6
Junior Poster
Liszt is offline Offline
122 posts
since Oct 2008
May 13th, 2009
0

Re: Back End Web Browser Interaction?

Was any of that C++, Liszt?
Reputation Points: 888
Solved Threads: 114
Nearly a Posting Virtuoso
MosaicFuneral is offline Offline
1,270 posts
since Nov 2008
May 14th, 2009
0

Re: Back End Web Browser Interaction?

Thank you for the input Liszt but parsing the login information into the URL won't work for me, what I essentially need is a way to automate the entering of text into the login/password text fields.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
spectrum6125 is offline Offline
2 posts
since May 2009
May 14th, 2009
0

Re: Back End Web Browser Interaction?

Well when the page loads up. You SHOULD CHECK OUT THE source and see for the names of the forms.

then you can write something like this

"http://www.some.some/login.php?FORMNAME1=Username&FORMNAME2=Password

Replace formname with the actual form names in the source and User Name and password with your user names
Reputation Points: 673
Solved Threads: 125
Practically a Posting Shark
Sky Diploma is offline Offline
818 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: employee class
Next Thread in C++ Forum Timeline: Check whether 2 Arrays contain the same values





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC