Googler24022 Posted December 4, 2006 Posted December 4, 2006 (edited) Hi, I have started coding in autoitscript again and this time I want to enter values into an online form. I checked out the documentation and it needs a form name for it to work, but the webpage I am trying to enter the information on has no form name.Is there a way to still enter my values into the form without the form name?Regards,-Matt. Edited January 29, 2012 by Googler24022
/dev/null Posted December 4, 2006 Posted December 4, 2006 Hi, I have started coding in autoitscript again and this time I want to enter values into an online form. I checked out the documentation and it needs a form name for it to work, but the webpage I am trying to enter the information on has no form name.Is there a way to still enter my values into the form without the form name?Regards,-Matt.Take a look at _IEFormGetCollection() and _IEFormElementGetCollection(). If there is only one form it's easy to identify "your" form. If there are many forms, you will have to figure out which one is the correct one. CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Googler24022 Posted December 4, 2006 Author Posted December 4, 2006 (edited) Nevermind, just solved it with the _IEFormGetCollection function. [Edit, thanks /dev/null,] Edited December 4, 2006 by Googler24022
Googler24022 Posted December 4, 2006 Author Posted December 4, 2006 (edited) Another problem. expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> HotKeySet("{ESC}" , "Terminate") GUICreate("Kings of Chaos", 400, 115) ; will create a dialog box that when displayed is centered GUISetState (@SW_SHOW) GUICtrlCreateLabel ("u", 7, 12) GUICtrlCreateLabel ("e", 7, 38) GUICtrlCreateLabel ("p", 7, 62) $username = GUICtrlCreateInput ("", 20, 10, 100) $email = GUICtrlCreateInput ("", 20, 35, 100) $password = GUICtrlCreateInput ("", 20, 60, 100, 20,$ES_PASSWORD) $login = GUICtrlCreateButton ( "Login", 20, 85, 100, 20) Func koc_login($username, $email, $password) $oIE = _IECreate ("http://www.kingsofchaos.com") $oForm = _IEFormGetCollection ($oIE, 0) $ousername = _IEFormElementGetObjByName ($oForm, "usrname") $oemail = _IEFormElementGetObjByName ($oForm, "uemail") $opassword = _IEFormElementGetObjByName ($oForm, "peeword") _IEFormElementSetValue ($ousername, $username) _IEFormElementSetValue ($oemail, $email) _IEFormElementSetValue ($opassword, $password) _IEFormSubmit ($oForm) EndFunc While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Func Terminate() Exit 0 EndFunc I have created the login function and the input forms on the GUI to correspond with it. How would I go about making the button submitting the values in the form to the function? Regards, -Matt. Edited December 4, 2006 by Googler24022
/dev/null Posted December 4, 2006 Posted December 4, 2006 Another problem. I have created the login function and the input forms on the GUI to correspond with it. How would I go about making the button submitting the values in the form to the function? Regards, -Matt. While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop if $msg = $login then ; see help file sample of GUICtrlCreateButton(). ; .... ; then read the values of the input controls with GUICtrlRead() - see help file sample. ; $passwd = GUICtrlRead(...) ; then call your function with the parameters. endif Wend Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Googler24022 Posted December 4, 2006 Author Posted December 4, 2006 Excellent, got it working. Many thanks. Regards, -Matt
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now