Sign in to follow this  
Followers 0
roc

web site auto login

4 posts in this topic

This is my first script and I need some help.

I just want to be able to have the script open and login to the web site for me. this is what I have so far. I have change the user, password, and website to test.

; Script Start - Add your code below here

#include <IE.au3>

Local $oUser, $oPass, $oSubmit

Local $sUser = "TEST"

Local $sPass = "TEST"

Local $url = "https://test.com/Login/"

Local $oIE = _IECreate($url, 1)

_IELoadWait($oIE)

$oInputs = _IETagNameGetCollection($oIE, "input")

for $oInput in $oInputs

if $oInput.type = "text" And $oInput.name="hprLogin$adUserName" And $oInput.id="hprLogin_adUserName" And $oInput.size = "12" Then $oUser = $oInput

if $oInput.type = "password" And $oInput.name="hprLogin$adPass" And $oInput.id="hprLogin_adPass" And $oInput.size = "12" Then $oPass = $oInput

if $oInput.type = "submit" And $oInput.name="hprLogin$btnSubmit" And $oInput.value="Login" Then $oSubmit = $oInput

if isObj($oUser) And isObj($oPass) And isObj($oSubmit) then exitloop

Next

$oUser.value = $sUser

$oPass.value = $sPass

_IEAction($oSubmit, "click")

_IELoadWait($oIE)

And the view source info

I think this is all that will be needed. Thank you for your help.

; Script Start - Add your code below here

#include <IE.au3>

Local $oUser, $oPass, $oSubmit

Local $sUser = "TEST"

Local $sPass = "TEST"

Local $url = "https://test.com/Login/"

Local $oIE = _IECreate($url, 1)

_IELoadWait($oIE)

$oInputs = _IETagNameGetCollection($oIE, "input")

for $oInput in $oInputs

if $oInput.type = "text" And $oInput.name="hprLogin$adUserName" And $oInput.id="hprLogin_adUserName" And $oInput.size = "12" Then $oUser = $oInput

if $oInput.type = "password" And $oInput.name="hprLogin$adPass" And $oInput.id="hprLogin_adPass" And $oInput.size = "12" Then $oPass = $oInput

if $oInput.type = "submit" And $oInput.name="hprLogin$btnSubmit" And $oInput.value="Login" Then $oSubmit = $oInput

if isObj($oUser) And isObj($oPass) And isObj($oSubmit) then exitloop

Next

$oUser.value = $sUser

$oPass.value = $sPass

_IEAction($oSubmit, "click")

_IELoadWait($oIE)

Share this post


Link to post
Share on other sites



Hi,

try to change this:

#include<IE.au3>
$sUsername = "Username"
$sPassword = "Password"
$sUrl = "https://ssl.rapidshare.com/premiumzone.html"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
Sleep(2000)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 0)
$oUsername = _IEFormElementGetObjByName($oForm, 'login')
$oPassword = _IEFormElementGetObjByName($oForm, "password")
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)
_IEFormSubmit($oForm)

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Hi,

try to change this:

#include<IE.au3>
$sUsername = "Username"
$sPassword = "Password"
$sUrl = "https://ssl.rapidshare.com/premiumzone.html"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
Sleep(2000)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 0)
$oUsername = _IEFormElementGetObjByName($oForm, 'login')
$oPassword = _IEFormElementGetObjByName($oForm, "password")
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)
_IEFormSubmit($oForm)

Mega

Thanks. It works for me

Share this post


Link to post
Share on other sites

Thanks. It works for me

Well, then congrats .. good search for your problem on your side!


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
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
Sign in to follow this  
Followers 0