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. vbs Script using msie as an object

vbs Script using msie as an object

Scheduled Pinned Locked Moved Visual Basic
algorithmstoolstutorialquestionlearning
2 Posts 2 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.
  • R Offline
    R Offline
    Ruzz
    wrote on last edited by
    #1

    I am attempting to write a script using ms ie as an object, and controlling a sequence of interactions with the site without having to physically move the mouse around and click and type into message boxes or select boxes. This is all from the client side, of course. So far, I have code that will alow me to open an explorer window at the selected http site and click on any button I want to. But I have not found a way to enter text, or select from a list box. Does anyone here know how to do this? I am beginning to think that it is not even possible after searching for hours on the net. Is there a way to simulate key presses? Where can I find a complete referance to the ie procedures? Russ

    D 1 Reply Last reply
    0
    • R Ruzz

      I am attempting to write a script using ms ie as an object, and controlling a sequence of interactions with the site without having to physically move the mouse around and click and type into message boxes or select boxes. This is all from the client side, of course. So far, I have code that will alow me to open an explorer window at the selected http site and click on any button I want to. But I have not found a way to enter text, or select from a list box. Does anyone here know how to do this? I am beginning to think that it is not even possible after searching for hours on the net. Is there a way to simulate key presses? Where can I find a complete referance to the ie procedures? Russ

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

      When you tell the IE Object to Navigate to a web page, it will fire a DocumentComplete (I Think!) event to let you know that the enitre page has been retrieved. In your event handler, you can get a reference to the Document using something like this:

      Dim objDocument as Document
      Set objDocument = objIEBrowser.Document

      (Someone feel free to correct me if I'm wrong!) From there, you can use the Document object to find the control that you want in its Elements collection. You can then modify the text you want, then you call the Click method of the submit button, which you will also find in the Elements collection somewhere. You can find the complete document on the Document object model here[^]. RageInTheMachine9532

      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