filmov
tv
VBScript Basics, Part 13 | Internet Explorer - HTML (Automation)

Показать описание
VBScripting (.vbs) Basic tutorial on how to directly input values into internet explorer through html code. This makes for a more flawless and smooth process rather than using sendkeys.
Code Example:
______________________________________________________
Option Explicit
Dim ie, ipf
Set ie = CreateObject("InternetExplorer.Application")
On Error Resume Next
Sub WaitForLoad
Do While IE.Busy
WScript.Sleep 500
Loop
End Sub
Sub Find(x)
Set ipf = ie.Document.All.Item(x)
End Sub
ie.Left = 0
ie.Top = 0
ie.Toolbar = 0
ie.StatusBar = 0
ie.Height = 120
ie.Width = 1020
ie.Resizable = 0
Call WaitForLoad
ie.Visible = True
Call Find("email")
ipf.Value = "EMAIL GOES HERE"
Call Find("pass")
ipf.Value = "PASSWORD GOES HERE"
Call Find("login_form")
ipf.Submit
Call WaitForLoad
ie.Height = 700
______________________________________________________
Know the Basics:
------------------------------------------------------------------------------------------
Set ie = CreateObject("InternetExplorer.Application")
ie.Document.All.Item("INPUT ID").Value = "what you want"
ie.Document.All.Item("FORM ID).Submit
------------------------------------------------------------------------------------------
Code Example:
______________________________________________________
Option Explicit
Dim ie, ipf
Set ie = CreateObject("InternetExplorer.Application")
On Error Resume Next
Sub WaitForLoad
Do While IE.Busy
WScript.Sleep 500
Loop
End Sub
Sub Find(x)
Set ipf = ie.Document.All.Item(x)
End Sub
ie.Left = 0
ie.Top = 0
ie.Toolbar = 0
ie.StatusBar = 0
ie.Height = 120
ie.Width = 1020
ie.Resizable = 0
Call WaitForLoad
ie.Visible = True
Call Find("email")
ipf.Value = "EMAIL GOES HERE"
Call Find("pass")
ipf.Value = "PASSWORD GOES HERE"
Call Find("login_form")
ipf.Submit
Call WaitForLoad
ie.Height = 700
______________________________________________________
Know the Basics:
------------------------------------------------------------------------------------------
Set ie = CreateObject("InternetExplorer.Application")
ie.Document.All.Item("INPUT ID").Value = "what you want"
ie.Document.All.Item("FORM ID).Submit
------------------------------------------------------------------------------------------
Комментарии