CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2005
    Posts
    76

    login from web page....

    After i click on "Area Clienti" appear the tipical window autentication

    How to insert in user box the value of my_var = user, and in password
    box the value of my_password=mypassword
    and after check "save pasword..." and click on ok button?????

    naturally in VB or VBA code

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: login from web page....

    It's not clear what you want to do, but you probably don't want to use VBA or VB6. Authenticating against a system can only be done when you know what is expected. What you see is usually not what you get.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jan 2005
    Posts
    76

    Re: login from web page....

    Quote Originally Posted by dglienna View Post
    It's not clear what you want to do, but you probably don't want to use VBA or VB6. Authenticating against a system can only be done when you know what is expected. What you see is usually not what you get.
    Sorry for my terrible english!;-)

    In effect when i click on Area Clienti (see attached image) appear the tipical windows form for autenticatin.

    I want to insert pasword and username and press ok via Vb6 code.
    This is the http:\\www.cerved.it

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: login from web page....

    Have you tried sendkeys ?

  5. #5
    Join Date
    Jan 2005
    Posts
    76

    Re: login from web page....

    Quote Originally Posted by DataMiser View Post
    Have you tried sendkeys ?

    ??? sendkeys ???

    in other case have you understand my prob?
    Tks for patience...
    Last edited by sal21; April 22nd, 2009 at 01:49 AM.

  6. #6
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: login from web page....

    Looks like a Windows Server. Maybe you could use the NET USE command to log in to a file share? Otherwise, change your username/password on your pc to the one that you want to log in as. If they match, your OS will supply them when asked.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  7. #7
    Join Date
    Jan 2005
    Posts
    76

    Re: login from web page....

    Quote Originally Posted by dglienna View Post
    Looks like a Windows Server. Maybe you could use the NET USE command to log in to a file share? Otherwise, change your username/password on your pc to the one that you want to log in as. If they match, your OS will supply them when asked.


    Maybe you could use the NET USE command to log in to a file share????

    In effect you suggest me to send via vb6 a command NET USE, similar:
    http:\\www.cerced.it\USE="xxxx", PASSWORD="YYYY" ecc....

  8. #8
    Join Date
    Mar 2009
    Posts
    12

    Re: login from web page....

    hi,
    you can use HTML DOM for this.
    you can look at the html source and find out following three things;
    1. userid text box id
    2. password text box ix
    3. the button you click to autheticate normally called login.

    IE.document.Forms.frmLogin.userid.Value = Text1.Text IE.document.Forms.frmLogin.Password.Value = Text2.Text
    IE.document.Forms.frmLogin.loginSubmit.Click

    here ;
    frmlogin is page name, you can get this from DOM inspector.
    userid, password are text boxes where you enter your userid and password.
    and loginsubmit is login command button name.

    note : i have used this in VB6. not sure if it'll work in dot net.

    Hope this helps.

    edit :
    you may also want to take a look at this : http://msdn.microsoft.com/en-us/libr...45(VS.85).aspx
    Last edited by adbanginwar; April 22nd, 2009 at 07:56 AM. Reason: added some text

  9. #9
    Join Date
    Jan 2005
    Posts
    76

    Re: login from web page....

    Quote Originally Posted by adbanginwar View Post
    hi,
    you can use HTML DOM for this.
    you can look at the html source and find out following three things;
    1. userid text box id
    2. password text box ix
    3. the button you click to autheticate normally called login.

    IE.document.Forms.frmLogin.userid.Value = Text1.Text IE.document.Forms.frmLogin.Password.Value = Text2.Text
    IE.document.Forms.frmLogin.loginSubmit.Click

    here ;
    frmlogin is page name, you can get this from DOM inspector.
    userid, password are text boxes where you enter your userid and password.
    and loginsubmit is login command button name.

    note : i have used this in VB6. not sure if it'll work in dot net.

    Hope this helps.

    edit :
    you may also want to take a look at this : http://msdn.microsoft.com/en-us/libr...45(VS.85).aspx
    Hi friend tks for suggestion...but i work with VB& classic not with .net
    But dubt have you clicked on link Area Clienti? appear the wondows box autentication?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured