Solved

Sendkeys to a Login Screen.....

Posted on 2004-07-30
3
620 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 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

18 Experts available now in Live!

Get 1:1 Help Now