MirnesC2
Active Members-
Posts
117 -
Joined
-
Last visited
MirnesC2's Achievements
Adventurer (3/7)
0
Reputation
-
figured it out please delete
-
Got it! Thanks for that and the udf
-
MirnesC2 reacted to a post in a topic:
Cant check checkbox!
-
MirnesC2 reacted to a post in a topic:
Cant check checkbox!
-
MirnesC2 reacted to a post in a topic:
Cant check checkbox!
-
MirnesC2 reacted to a post in a topic:
Cant check checkbox!
-
MirnesC2 reacted to a post in a topic:
Cant check checkbox!
-
Thats a useful .udf thanks for that! output... >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\User\Desktop\ddd.au3" --> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType ! _IE_test_FormElementCollection: IsObj($oIE) = 1 ! _IE_test_FormElementCollection: IsObj($oForms) = 1 ! _IE_test_FormElementCollection: $iForm_index = 0 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host" class="m-wrap small" type="text" placeholder="00000000"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port" class="m-wrap small" type="text" placeholder="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="time" class="m-wrap small" type="text" placeholder="60"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = time ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" checked="" value="Method Type"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 4 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="charge"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 5 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="css"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 6 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="syn"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 7 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="Hide" type="checkbox" value="yes"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = Hide ! _IE_test_FormElementCollection: $iElement_index = 8 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="goBtn" class="btn blue" type="submit" value="Go!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = goBtn ! _IE_test_FormElementCollection: $iForm_index = 1 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host" class="m-wrap medium" type="text" placeholder="web address"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port" type="hidden" value="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="time" class="m-wrap small" type="text" placeholder="60"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = time ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" checked="" value="xml"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 4 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="rude"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 5 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="mear"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 6 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="slow"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 7 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="get"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 8 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="post"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 9 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="method" type="radio" value="head"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = method ! _IE_test_FormElementCollection: $iElement_index = 10 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="goBtn" class="btn blue" type="submit" value="Go!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = goBtn ! _IE_test_FormElementCollection: $iForm_index = 2 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopCheck[]" type="checkbox" value="2241"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopCheck[] ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopbtn" class="btn red" type="submit" value="Stop!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopbtn ! _IE_test_FormElementCollection: $iForm_index = 3 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="host2" class="m-wrap small" type="text" placeholder="000000"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = host2 ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="port2" class="m-wrap small" type="text" placeholder="80"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = port2 ! _IE_test_FormElementCollection: $iElement_index = 2 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="times" class="m-wrap small" type="text" placeholder="15"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = times ! _IE_test_FormElementCollection: $iElement_index = 3 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="redirect" class="btn light-blue" type="submit" value="Redirect" !"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = redirect --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementCheckboxSelect, $_IEStatus_InvalidDataType >Exit code: 0 Time: 2.416 I think this the bit we are looking for is this.. ! _IE_test_FormElementCollection: $iForm_index = 2 ! _IE_test_FormElementCollection: $oForm "Type" = HTMLFormElement ! _IE_test_FormElementCollection: $oForm.id = 0 ! _IE_test_FormElementCollection: $oForm.name = 0 ! _IE_test_FormElementCollection: $iElement_index = 0 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopCheck[]" type="checkbox" value="2241"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopCheck[] ! _IE_test_FormElementCollection: $iElement_index = 1 ! _IE_test_FormElementCollection: $oElement "Type" = HTMLInputElement ! _IE_test_FormElementCollection: $oElement "OuterHtml" = <input name="stopbtn" class="btn red" type="submit" value="Stop!"> ! _IE_test_FormElementCollection: $oElement.id = 0 ! _IE_test_FormElementCollection: $oElement.name = stopbtn So how do we set it up to find the form/object now?
-
Welp so much for a simple script, running into problems around every corner it seems >.> This is what I am looking to check off.. That does sound like it could be the issue, it's most likely not hooked right to the box so it can't check it off.. which is what the error messages are saying I am assuming. --> IE.au3 V2.4-0 Warning from function _IEFormGetCollection, $_IEStatus_NoMatch --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetCollection, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementSetValue, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Error from function _IEAction, $_IEStatus_InvalidDataType --> IE.au3 V2.4-0 Warning from function _IEFormElementCheckboxSelect, $_IEStatus_NoMatch How do I find the right object?
-
Hey, there is a checkbox on IE which I would like to manipulate. The .HTML is as follows.. <td><input type="checkbox" value="557" name="stopCheck[]"></td> I have tried this.. (using the IEFormElementCheckBoxSelect) _IELoadWait($oIE) Local $oForm = _IEFormGetCollection($oIE, 0) _IEFormElementCheckBoxSelect($oForm, 0, "stopCheck[]", 1, "byIndex") But it still will not check the box. I am either doing something wrong in $oForm with the IEFormGetCollection() or IEFormElementCheckBoxSelect() but can't figure out what >.> I followed the examples in the help files.. Any ideas? Thanks!
-
MirnesC2 reacted to a post in a topic:
What do I use for this IE form?
-
MirnesC2 reacted to a post in a topic:
What do I use for this IE form?
-
MirnesC2 reacted to a post in a topic:
What do I use for this IE form?
-
What do I use for this IE form?
MirnesC2 replied to MirnesC2's topic in AutoIt General Help and Support
Ahh yes that worked! Thank you!! -
What do I use for this IE form?
MirnesC2 replied to MirnesC2's topic in AutoIt General Help and Support
Still nothing, didn't even submit the form :3 -
What do I use for this IE form?
MirnesC2 replied to MirnesC2's topic in AutoIt General Help and Support
Ah thank you! The IEFormGetCollection worked when finding it by index. But for some reason the submit function still isn't working. It's the correct username and password entered.. when i take out the submitform part and hit the button manually it works. But with the submit form it submits and just refreshes the page it seems.. no login failed, nothing.. it just resets the username and passwords. #include <IE.au3> Local $oIE = _IECreate("http://www.web.net/",0,1,1,1) Local $oForm = _IEFormGetCollection($oIE, 0) _IELoadWait($oIE) Local $oQuery = _IEFormElementGetCollection($oForm, 0) _IEFormElementSetValue($oQuery, "username") Local $oQuery = _IEFormElementGetCollection($oForm, 1) _IEFormElementSetValue($oQuery, "password") _IEFormSubmit($oForm) -
This is the HTML pulled from the desired page.. <!-- BEGIN BODY --> <body class="login"> <!-- BEGIN LOGO --> <div class="logo"> <img src="assets/img/logo-big.png" alt="" /> </div> <!-- END LOGO --> <!-- BEGIN LOGIN --> <div class="content"> <!-- BEGIN LOGIN FORM --> <form class="form-vertical login-form" method="post"> <h3 class="form-title">Login to your account</h3> <div class="control-group"> <div class="controls"> <div class="input-icon left"> <i class="icon-user"></i> <input class="m-wrap" type="text" name="username" placeholder="Username" /> </div> </div> </div> <div class="control-group"> <div class="controls"> <div class="input-icon left"> <i class="icon-lock"></i> <input class="m-wrap" type="password" style="" name="password" placeholder="Password" /> </div> </div> </div> <div class="form-actions"> <label class="checkbox"> <input type='checkbox' name='rememberme'><A title='Saves your session for 48 hours' rel='tooltip-b' herf='#'>Remember me</a> </label> <input type="submit" id="login-btn" name="loginBtn" class="btn green pull-right" value="Login" /> </form> </div> <div class="forget-password"> <h4>Don't have an account ?</h4> <p> no worries, click <a href="javascript:;" class="" id="forget-password">here</a> to register an account. </p> </div> </form> <!-- END LOGIN FORM --> and this is my .au3 code #include <IE.au3> Local $oIE = _IECreate("http://www.website.net/",0,1,1,1) Local $sHTML = _IEBodyReadHTML($oIE) ;---> Finds login in forms and defines it to variable. $oForm = _IEFormGetObjByName($oIE, "form-vertical login-form") ;--->Reports error. Exit on error, else login. If $oForm = 0 Then MsgBox(48,"Error", "Error "&@error&" has occured handling the variable '$oForm'.") Exit Else ;--->Creates variables for input fields in targeted form above. $iUser = _IEFormElementGetObjByName($oForm, "username") $iPass = _IEFormElementGetObjByName($oForm, "password") ;--->Enters data into input fields of IE window. _IEFormElementSetValue($iUser, "john") _IEFormElementSetValue($iPass, "orange12") ;--->Submits form to server. _IEFormSubmit($oForm) EndIf I keep getting error 7 (7 ($_IEStatus_NoMatch) = No Match) which means it's not finding the form by what I put in I suppose.. what would I put for the login ID or NAME instead of "form-vertical login-form" which isn't working??
-
Yeeeaaah, that does work along with adding a space but I was hoping there would be another way to do it that didn't involving adding those macros and/or spaces. It would get messy later on. But if those are the only options then its no big deal I guess, it would have made the GUI look nicer but thats not too important.
-
Yup that worked, thanks! Now I just need to figure out how to indent WITHOUT adding extra spaces in my strings " (space)blah blah"
-
MirnesC2 reacted to a post in a topic:
Disabled Editbox WITH color?
-
Hey, I know that GUICtrlSetColor() changes the font color inside an editbox and setting the editboxes state to $GUI_DISABLE will disable it from being written used. My question is... Is there anyway to disable the editbox AND change the font color inside the box? When ever I add the $GUI_DISABLE, it overwrites the color I set the it to (green in this case) and changes it to grey. Is there anyway to bypass this? Also, is there a way to create padding inside the text box? I think that the text is too close to the border... Is there away to change the spacing from borders? #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region: Graphical User Interface $wProgram = GUICreate("CraigsList Alert", 306, 210, 545, 295) $wExecute = GUICtrlCreateButton("Execute", 8, 176, 65, 25) $wCommand = GUICtrlCreateInput("", 8, 152, 289, 21) $wConsole = GUICtrlCreateEdit("Welcome", 8, 8, 289, 145, BitOR($ES_AUTOVSCROLL,$ES_WANTRETURN)) $wStart = GUICtrlCreateButton("Start", 80, 176, 65, 25) $wFetch = GUICtrlCreateButton("Fetch Data", 208, 176, 91, 25) GUICtrlSetBkColor($wConsole, 0x000000) GUICtrlSetBkColor($wCommand, 0x000000) GUICtrlSetColor($wConsole, 0x80FF00) GUICtrlSetColor($wCommand, 0x80FF00) GUICtrlSetState($wConsole, $GUI_DISABLE) GUISetState(@SW_SHOW) #EndRegion While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Here is what I am talking about...
-
MirnesC2 reacted to a post in a topic:
2D Array Error
-
Oohhh okay I see now. Thank you! That solves it P.S. Diggin the new "Mark solved" feature.
-
Yeah, maybe you're right I kinda feel as if I have been doing that lately.. I don't know why. I don't find offense in my replies, yet someone else always does. It might just be because of where I am from. You get something slightly sarcastic, so you dish out something slightly sarcastic. And in the end no one takes offense. Here it seems to get people's panties in a bunch. I managed to figure out how to do it in multiple lines. #include <Array.au3> Local $data[10][3] For $i = 0 To 10-1 Step +1 $data[$i][0] = 1987 $data[$i][1] = "Tooth Brush" $data[$i][2] = "$3.00" Next _ArrayDisplay($data) I was hoping to accomplish it with a single line like... #include <Array.au3> Local $data[10][3] For $i = 0 To 10-1 Step +1 $data[$i] = [1398, "Toothbrush", "$3.00"] Next _ArrayDisplay($data) But can't seem to figure out the error im making? It's not that big of deal though I guess. And thank you jdelaney for the example!