Sign in to follow this  
Followers 0
sveetas

Need code fast . thx

11 posts in this topic

Hi . i need simple submit script. to login in website :

web source:

<form action="index.php?id=login" method="post">
username
<input type="text" name="nick"><br>
password:
<input type="password" name="pass"><br>
<input type="submit" value="Prisijungti">
</form>

#include
Local $loginas = InputBox("Loginas", "Cia irasome zaidimo logina", "LOGIN", "");
Local $passwd = InputBox("Slaptazodis", "CIa irasome slaptazodi", "", "*")

Call ("signIn")

Func signIn ()

Global $oIE = _IECreate ("http://dba.us.lt")

Local $username = _IEGetObjByName ($oIE,"nick")
Local $password = _IEGetObjByName ($oIE,"pass")

_IEFormElementSetValue ($username,$loginas)
_IEFormElementSetValue ($password,$passwd);
EndFunc

all function work .write pass and nick . but i dont know how press : submit function

but have problem to press button and loggin

sorry for me english

Share this post


Link to post
Share on other sites



lol . if u know plz help .

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Local $oForm = _IEFormGetObjByName($oIE, "ExampleForm")

password:

<input type="submit" value="Prisijungti">><br> not have name .to find? o i downt know ..

Edited by sveetas

Share this post


Link to post
Share on other sites

#include
$sUsername = "Username"
$sPassword = "Password"
$sUrl = "dba.us.lt"
$oIE = _IECreate($sUrl, 0, 1, 0, 1)
Sleep(2000)
$oHWND = _IEPropertyGet($oIE, "hwnd")
WinSetState($oHWND, "", @SW_MAXIMIZE)
$oForm = _IEFormGetCollection($oIE, 0)
$oUsername = _IEFormElementGetObjByName($oForm, 'nick')
$oPassword = _IEFormElementGetObjByName($oForm, "pass")
_IEFormElementSetValue($oUsername, $sUsername)
_IEFormElementSetValue($oPassword, $sPassword)
_IEFormSubmit($oForm)


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

thx

Share this post


Link to post
Share on other sites

No problem. Next time please post questions in supoort forums as James mentioned.

@Mods : Please move to support forum


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

And what lesson have we learned here today? Being persistently stupid gets your way. Win one for the impatience of youth, I'm so proud.

4 people like this

Share this post


Link to post
Share on other sites

and that the following forum rule is ignored if the bulk of the answers come from MVPs?

Bypassing of security measures - log-in

1 person likes this

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

@Mods : Please move to support forum

Nah ... and maybe next time refrain from replying with people that are so impatient they can't be bothered to post in the correct forum.

*click*

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0