JunglesMcBeef
Programmer
- Sep 18, 2003
- 266
G'day,
I'm trying to create a console program that opens IE and sends keys to log in. I have already got it working so the browser opens and can be sent keys while in focus, but I don't want the browser to be in focus when I send the keys. Is there a way to do this?
Also, is there some sort of way to determine whether the current site has loaded completely? I have just used System.Threading.Thread.Sleep to allow some time before execution continues to allow the site to load, but this is not efficient and means if a dial-up connection is used (or there is spyware/adware/viruses taking up bandwidth) that the console will have to wait longer.
I'm trying to create a console program that opens IE and sends keys to log in. I have already got it working so the browser opens and can be sent keys while in focus, but I don't want the browser to be in focus when I send the keys. Is there a way to do this?
Also, is there some sort of way to determine whether the current site has loaded completely? I have just used System.Threading.Thread.Sleep to allow some time before execution continues to allow the site to load, but this is not efficient and means if a dial-up connection is used (or there is spyware/adware/viruses taking up bandwidth) that the console will have to wait longer.