How would I go about writing a string to a target in the default browser e.g. Firefox or chrome, I don't want to use the webbrowser in vb, I've looked all over and tried a few things but all with no success.
The main objective is to log into a webpage through the default browser.
Thanks 🤝
Mar 3, 2016 09:04 PM
(This post was last modified: Mar 3, 2016 09:04 PM by Cecilia.)
1. Don't, unless you want a nightmare.
2. You can use different 'browser' packs, check out Awesomium or Gecko.
The second option is more viable, but you might be more limited in it, than in the standard web browser control.
DO NOT DEAL WITH THIS MEMBER
You can use webrequests or webclients to login to a web page.
(Mar 4, 2016 12:05 PM)Ninja Wrote: You can use webrequests or webclients to login to a web page.
Exactly, way more efficient.
DO NOT DEAL WITH THIS MEMBER
Mar 4, 2016 05:29 PM
(This post was last modified: Mar 4, 2016 05:29 PM by Ninja.)
(Mar 4, 2016 05:08 PM)Cecilia Wrote: Exactly, way more efficient.
Yee.
And on top of that, I forgot to mention, make sure you handle sessions well. I believe the webclient doesn't handle cookies on it's own so I recommend webrequests. MSDN has documentation and examples for webrequests (and also webclients of course).
(Mar 4, 2016 05:29 PM)Ninja Wrote: Yee.
And on top of that, I forgot to mention, make sure you handle sessions well. I believe the webclient doesn't handle cookies on it's own so I recommend webrequests. MSDN has documentation and examples for webrequests (and also webclients of course).
Please, don't make a class for 'web requests' because you 'need cookie support'.
Extend webclient, its awesome.
DO NOT DEAL WITH THIS MEMBER
Mar 5, 2016 07:03 AM
(This post was last modified: Mar 5, 2016 07:06 AM by Ninja.)
(Mar 4, 2016 05:32 PM)Cecilia Wrote: Please, don't make a class for 'web requests' because you 'need cookie support'.
Extend webclient, its awesome.
You and me both have very different definitions of awesome then. Webrequest already has support for cookies so why extend webclient then. Write a simple class to send webrequests and automatically write postdata and set the post headers, automatically read responses to a string, and optionally a reference parameter to a cookie container object, then you can send webrequests to whatever site you want with 2-3 lines of code.
|