Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
misha_light pe Simpatie
Femeie
25 ani
Bucuresti
cauta Barbat
26 - 47 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[VBS] Open Video Camera Viewer and Login in Internet Explorer

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2388
I use the code below to connect to an account where I can view some video camera live streams via Internet Explorer.

The code does not contain any sensitive data, of course, it just sets the options required for an Internet Explorer open and login user and password completion the button click.

It also moves mouse cursor using an old Excel function (see end part).


' #### OPEN INTERNET EXPLORER AND WEBSITE

Set IE = CreateObject("InternetExplorer.Application")

IE.Visible = 1
IE.navigate "http://IP_ADDRESS:PORT/webcamera.html"

Do While (IE.Busy)
   WScript.Sleep 500
Loop

' #### MOVE INTERNET EXPLORER WINDOW TO 2ND SCREEN AT COORDINATES

IE.Top = -190
IE.Left = -1910
IE.width = 1920
IE.height = 1080

' #### INPUT USER NAME, PASSWORD AND CLICK LOGIN BUTTON

Set Helem = IE.document.getElementByID("username")
Helem.Value = "USERNAME" ' change this to yours

Set Helem = IE.document.getElementByID("userpwd")
Helem.Value = "PASSWORD" ' change this to yours

Set Helem = IE.document.getElementByID("login_ok_button")
Helem.Click

' #### MOVE CURSOR TO LOCATION (ON BUTTON) BY USING AN OLD EXCEL FUNCTION

Dim Excel, x, y

Set Excel = WScript.CreateObject("Excel.Application")

x = "-731"
y = "539"
Excel.ExecuteExcel4Macro ( _
    "CALL(""user32"",""SetCursorPos"",""JJJ""," & x & "," & y & ")")

WScript.Sleep (100)


_______________________________________


 
   
Pagini: 1  
Mergi la