Jump to content

Consty

Members
  • Posts

    11
  • Joined

  • Last visited

Consty's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. FOUND THE ERROR! After reading everything here and thinking - it hit me. I went looking for the function _IEFormSubmit - cause it is the last one in the login function. Func _IEFormSubmit(ByRef $o_object, $f_wait = 1) If Not IsObj($o_object) Then __IEErrorNotify("Error", "_IEFormSubmit", "$_IEStatus_InvalidDataType") Return SetError($_IEStatus_InvalidDataType, 1, 0) EndIf ; If Not __IEIsObjType($o_object, "form") Then __IEErrorNotify("Error", "_IEFormSubmit", "$_IEStatus_InvalidObjectType") Return SetError($_IEStatus_InvalidObjectType, 1, 0) EndIf ; Local $o_window = $o_object.document.parentWindow $o_object.submit If $f_wait Then _IELoadWait($o_window) Return SetError(@error, 0, -1) EndIf Return SetError($_IEStatus_Success, 0, -1) EndFunc ;==>_IEFormSubmit Indeed there is a _IELoadWait here I removed the _IELoadWait with a small sleep timer and it works! thank you all for the help! edit: MrMitchell - didn't see your post cause i was writing a reply here hehe, thanks! edit2: i restored the _IEFormSubmit to original and added _IEFormSubmit ($oForm, 0) - and it works!!!
  2. here u go, nothing special in here Func Login() $oklik = _IEGetObjById ($object_ctrl, "loginBtn") ;login button _IEAction ($oklik, "click") $oLogin = _IEFormGetCollection ($object_ctrl, 0) global $oQueryLogin = _IEFormElementGetObjByName ($oLogin, "uni_url") ;uni sellection _IEFormElementOptionselect ($oQueryLogin, 5, 1, "byIndex") $var = IniRead("info.ini", "info", "ime", "NotFound") ;name read $var2 = IniRead("info.ini", "info", "pass", "NotFound") ;pass read $oForm = _IEFormGetObjByName ($object_ctrl, "loginForm") $oQuery1 = _IEFormElementGetObjByName ($oForm, "login") _IEFormElementSetValue ($oQuery1, $var) ;set name Sleep(100) $oQuery1 = _IEFormElementGetObjByName ($oForm, "pass") _IEFormElementSetValue ($oQuery1, $var2) ;set pass Sleep(100) _IEFormSubmit ($oForm) EndFunc
  3. I said that nothing works... i removed the _IELoadWait and it does the same. After the login function, i put a simple msgbox which should appear after the login - but it does not.
  4. I noticed, that script actualy doesen't do nothing for about 5 min - after logging on the site. No function works. After that time, the response is normal. I tried a few simple things (msgbox) after the login - nothing! At the start page everything works - after login it freezes. I put a 5min sleep after the login, and then everything works normal. The downtime troubles me, cause i don't know what is happening... I guess it must be something wierd with the site that does it.
  5. Nope, nothing helps. I could get the session id from the links on the page and string management, but everything i try works so slow. I tried with "_IELinkGetCollection" - same thing. Script does nothing for about 5 min. I don't get it... Does the page code matter?
  6. the lower part - where it doesent work While 1 call("Login") _IELoadWait ($object_ctrl) $sText = _IEPropertyGet ($object_ctrl, "locationurl") $array909 = StringSplit($sText, "&session=") _ArrayDisplay($array909, "AllStrings") $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
  7. After opening a web page and logging in, i use the "locationurl" in the function "_IEPropertyGet". I need the current url to get the session id - but here comes the problem. My script kinda freezes and does nothing for about 5min. After that, it does what it's supposed to do. Why does it need such a long time to give me the URL? I tried a few other things from the _IEPropertyGet function - does the same thing. Help please
  8. The script works on my computer (saved source code of the page) but only "flashes" when i try it online - it does not submit the option selected. So, when i open the file on my pc it trys to redirect - but not online. Any ideas why it doesent work? I've tried almost everything... _IENavigate($oIE, "myfile.htm") _IELoadWait($oIE) $oForm= _IEFormGetCollection ($oIE,0) $oSelect = _IEFormElementGetCollection ($oForm, 0) _IEFormElementOptionselect ($oSelect, "bd329046a8f5708718afcd48fe1370ac", 1, "byvalue") _IEFormSubmit ($oForm) the page is a drop down menu with a submit, something like this: <form action="buy.php " method="POST"></form><form action="buy.php" method="POST"></form><div class="tdi">overall (1200$)<br /> <form action=" buy.php " method="POST"> <select name="mission[1]" size="1" class="input"> <option value="bd329046a8f5708718afcd48fe1370ac">keyboard</option> <option value="3f164adf7515637a3108bedc7af6ab4b">monitor</option> <option value="4b917ab7b92aa98d5519654b6f1ef1da">main board</option> <option value="8a1cf39b21fd7f4e3af568217923c2a9">mouse</option> <option value="2ede76f7095a4a93d18194f38cee9193">graphic</option> <option value="2424922c493212ee2331c71af9713b69">overall</option> </select> <input type="hidden" name="mcp" value="1"> <input type="submit" class=input name="b1" value="Search!"> </form thanks
  9. *bump* still need help here
  10. *bump* I am having troubles here as well. Problem is that the form has no name?! what do you do in this case? example: #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) _IEFormGetObjByName doesn't work because the form here has no name. "Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType" nothing i can do any ideas?
  11. Hello all! I am making a bot for a MMORPG online game. So far so good - it works. You forum is really helpfull. I want to add some new features but i can't solve my problem. It's about win/loss statistics and how much gold you win/lose. With the help of it, i could make the bot store the names and auto attack those who give a lot of gold. Here is how it goes: After an attack, bot goes to messages, puts up a search bar and finds the part where it says: "blabla captured: 8" ("captured: " is the search keyword). Mouse then drags over the number and copies it. Ok, it is primitive but it works. Mouse movements are not aways accurate and i want to minimise them. What are yout suggestions? How can i get a number from a row in text? source of it: <h2>Winner: blabla</h2><p>blabla captured: 138 <img src="img/res2.gif" alt="Gold" align="absmiddle" border="0"> </p> thanks in advance edit: forgot add that bot works and navigates through IE.
×
×
  • Create New...