Jump to content

Logging into multiple windows


Recommended Posts

Hi all,

I saw this example here and it works pretty well:


I've played with this for hours.  I can't seem to open a new window (in a new tab) and have it do the same thing.  I am drawing a total blank.  

What I am trying to do is open several windows in new tabs and enter the userID and password in the given field without it giving me errors.  Simple delays are too clumsy.

Any ideas?


Link to comment
Share on other sites

Sure, the code is the one from the link I referenced:

$sUsername = "Username"
$sPassword = "Password"
$sUrl = "https://yoururl.com"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 0)
$oUsername = _IEFormElementGetObjByName($oForm, 'login') ; change name !
$oPassword = _IEFormElementGetObjByName($oForm, "password") ; change name !
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)


Thanks for the function Smoke, I'll play around with it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...