Solved

Sendkeys to a Login Screen.....

Posted on 2004-07-30
3
625 Views
Last Modified: 2008-02-01
FYI I'm new to programming........Taking 2 classes in Sept.

Anyways, I'm trying to Login using SendKeys......
I was using Access but found to many restrictions.......

I now have VB.net 6......

     Problem that I'm having is when I click on the button IE opens, goes to the web page and then nothing......
Sometimes the UserID data with show up in the IW web address box, or the web page will open up
with the cursor blinking, waiting for the username and password....

******  What's Missing Here.....?

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ie : ie = CreateObject("InternetExplorer.Application")
        Dim Wsh : Wsh = CreateObject("WScript.Shell")

        ie.visible = True
        ie.navigate2("http://guest.realtylife.com/")
        Wsh.SendKeys("xsocalmls")
        Wsh.SendKeys("st7st7Xas")

       
    End Sub
0
Comment
Question by:JaguarSoCal
3 Comments
 
LVL 14

Accepted Solution

by:
aelatik earned 125 total points
ID: 11683312
Since you are using sendkeys there is no security issue to consider.
Why don't you post the username and password directly in the URL ?


        Dim ie : ie = CreateObject("InternetExplorer.Application")
        ie.visible = True
        ie.navigate2("http://xsocalmls:st7st7Xas@guest.realtylife.com/")


BTW : You have put a valid username and password on the post, isn't that a problem ?
0
 
LVL 14

Expert Comment

by:ptakja
ID: 11684417
Another method you could use to kick off IE (which, incidentally, is the .NET preferred way of doing it is this:

System.Diagnostics.Process.Start("iexplore.exe", "http://xsocalmls:st7st7Xas@guest.realtylife.com/")

That will open up iexplorer.exe and navigate to the site listed in 1 line of code.

The line below will open up the default web browser app and navigate to the site listed.

System.Diagnostics.Process.Start("http://xsocalmls:st7st7Xas@guest.realtylife.com/")

0
 

Author Comment

by:JaguarSoCal
ID: 11685381
aelatik   Since you have the 1st working response, you get the credit.....

Thanx alot....

I was told earlier that MicroSoft did not allow UserName and Passwords in the current version of IE....


Thanx Again
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now