Jump to content
Sign in to follow this  
sveetas

Need code fast . thx

Recommended Posts

sveetas

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
sveetas

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
Xenobiologist

#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
Xenobiologist

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
wraithdu

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.

  • Like 4

Share this post


Link to post
Share on other sites
iamtheky

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

Bypassing of security measures - log-in

  • Like 1

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

Share this post


Link to post
Share on other sites
Jos

@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                                How to post scriptsource        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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.