Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. login into website

login into website

Scheduled Pinned Locked Moved Visual Basic
comlinuxbeta-testingtoolshelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DanYELL
    wrote on last edited by
    #1

    How can I log into a website. Lets take as an example, logging into codeproject.com. I have: Dim objIE Set objIE = WScript.CreateObject("InternetExplorer.Application") objIE.Navigate "http://www.codeproject.com" objIE.Visible = true While objIE.Busy = true Wend objIE.Document.All("Email").Value = "brinasas@yahoo.com" objIE.Document.All("Password").Value = "xxxxxx" objIE.Document.All("button").Click 'Dim Wsh : set Wsh = CreateObject("WScript.Shell") 'Wsh.SendKeys "{ENTER}" But the above script gives me an error. Any feedback anyone can give me will be greatly appreciated.

    D D 2 Replies Last reply
    0
    • D DanYELL

      How can I log into a website. Lets take as an example, logging into codeproject.com. I have: Dim objIE Set objIE = WScript.CreateObject("InternetExplorer.Application") objIE.Navigate "http://www.codeproject.com" objIE.Visible = true While objIE.Busy = true Wend objIE.Document.All("Email").Value = "brinasas@yahoo.com" objIE.Document.All("Password").Value = "xxxxxx" objIE.Document.All("button").Click 'Dim Wsh : set Wsh = CreateObject("WScript.Shell") 'Wsh.SendKeys "{ENTER}" But the above script gives me an error. Any feedback anyone can give me will be greatly appreciated.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Why is it noone ever thinks the error message is an important detail to put into a post concerning the non-functioning of a piece of code?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Why is it noone ever thinks the error message is an important detail to put into a post concerning the non-functioning of a piece of code?

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        D Offline
        D Offline
        DanYELL
        wrote on last edited by
        #3

        The error says: Line: 10 Char: 1 Error: Object required: 'Document.All(...)' Code: 800A01A8 Source: Microsoft VBScrpt runtime error Line 10 is this line: objIE.Document.All("Email").Value = "brinasas@yahoo.com" Any response you can give me will be greatly appreciated.

        D 1 Reply Last reply
        0
        • D DanYELL

          How can I log into a website. Lets take as an example, logging into codeproject.com. I have: Dim objIE Set objIE = WScript.CreateObject("InternetExplorer.Application") objIE.Navigate "http://www.codeproject.com" objIE.Visible = true While objIE.Busy = true Wend objIE.Document.All("Email").Value = "brinasas@yahoo.com" objIE.Document.All("Password").Value = "xxxxxx" objIE.Document.All("button").Click 'Dim Wsh : set Wsh = CreateObject("WScript.Shell") 'Wsh.SendKeys "{ENTER}" But the above script gives me an error. Any feedback anyone can give me will be greatly appreciated.

          D Offline
          D Offline
          Dalek Dave
          wrote on last edited by
          #4

          Read This[^], it may help.

          ------------------------------------ I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave CCC Link[^] Trolls[^]

          1 Reply Last reply
          0
          • D DanYELL

            The error says: Line: 10 Char: 1 Error: Object required: 'Document.All(...)' Code: 800A01A8 Source: Microsoft VBScrpt runtime error Line 10 is this line: objIE.Document.All("Email").Value = "brinasas@yahoo.com" Any response you can give me will be greatly appreciated.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            That would be because Document.All("Email") didn't return an object. This means you cannot set the Value property of an object that doesn't exist. You may want to check to see if that code returned an object before you try and use it.

            Dim c
            Set c = objIE.Document.All("Email")
            If c Is Nothing Then
               ' A control called "Email" doesn't exist in the page!
               ' Handle this condition appropriately.
            Else
                c.Value = "blah@somewhere.net"
            End If
            

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups