
izis89
Members-
Posts
10 -
Joined
-
Last visited
Everything posted by izis89
-
I also encountered this bug previously using excel list also. In that script, autoit kept losing excel object after looping 216 times. And yes, I remember this number correctly because it frustrated me as hell. I completed what I had to do then just by relaunching the script and continuing from where the script crashed. But for this one it was not an option because it crashes way to early. And of course I will not think autoit is bad it has many great inbuilt functions and even more UDF which simplifies what would otherwise be quite complicated. + the community is great it motivates to learn and return the favours by adding something to it.
-
How get the Event Close position? [Solved]
izis89 replied to RCLens's topic in AutoIt General Help and Support
Hm... I am still not quite sure what is the problem. You want window to be closed without pressing red cross? Or you just need corrdinates for red cross but not interact with it? Well, this gives you a position of the red cross: $WinPos = WinGetPos ( "Untitled" ) Onscreen coordinates for the red cross are $WinPos[0] + $WinPos[2] - 15 , $WinPos[1] + 10 You can make a While 1 loop to make script get coordinates indefinite times if the window is literally moving around constantly. Also, have you tried Controlsend ALT+F4 to window you want to close if that is your goal? -
Sorry, I meant running script in x86 environment. You have an option to run script either in x86 or in x64 environment. Now I tried running it in x64 and it passed 46 and 42 marks. I did not wait for the crash. However.... I cannot compile script to x64 because of compatibility reasons. Some functions in my script simply does not work when compiled for x64. In this test code x64 would be ok to use. And... https://www.autoitscript.com/autoit3/docs/appendix/LimitsDefaults.htm I guess it is possible that script exceeds function call limit as described here..? And when i replace $TxtField = _IEGetObjById($oIEObject, "lst-ib") $TxtField.value = "lalala" $SearchButton = _IEGetObjByName($oIEObject,"btnK") With this one $SearchButton = _IEGetObjByName($oIEObject,"btnK") $TxtField = _IEGetObjById($oIEObject, "lst-ib") $TxtField.value = "lalala" It gives different line for the error. So the problem is not with the specific line and I think it is impossible that every time IE would not have time to load on the same loop instance. All that msgbox/sleep, etc. bs was the first thing I tried and as you might guessed... it did not helped. And regarding temp files, shutdown... Are you starting to troll? So... Does anyone has any idea how to work around MAXCALLRECURSE or any other limit that might play a role here?
-
How get the Event Close position? [Solved]
izis89 replied to RCLens's topic in AutoIt General Help and Support
Here is a way to do it. It works if you don't mind mouse moving all over the screen. You can also use controlsend ALT+F4 to window you want to close. $WinPos = WinGetPos ( "Untitled" ) WinActivate ("Untitled") MouseClick ("left", $WinPos[0] + $WinPos[2] - 15 , $WinPos[1] + 10, 1, 0) -
And without adding "Try to attach" parameter in _IECreate --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop Counter: 1 Counter: 2 Counter: 3 Counter: 4 Counter: 5 Counter: 6 Counter: 7 Counter: 8 Counter: 9 Counter: 10 Counter: 11 Counter: 12 Counter: 13 Counter: 14 Counter: 15 Counter: 16 Counter: 17 Counter: 18 Counter: 19 Counter: 20 Counter: 21 Counter: 22 Counter: 23 Counter: 24 Counter: 25 Counter: 26 Counter: 27 Counter: 28 Counter: 29 Counter: 30 Counter: 31 Counter: 32 Counter: 33 Counter: 34 Counter: 35 Counter: 36 Counter: 37 Counter: 38 Counter: 39 Counter: 40 Counter: 41 Counter: 42 Counter: 43 Counter: 44 Counter: 45 Counter: 46 "C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1899) : ==> The requested action with this object has failed.: If IsObj($oObject.document.getElementById($sID)) Then If IsObj($oObject.document^ ERROR ->20:35:11 AutoIt3.exe ended.rc:1
-
This is what console gives me: >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Rimas\Desktop\test11111111.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 1 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 2 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 3 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 4 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 5 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 6 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 7 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 8 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 9 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 10 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 11 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 12 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 13 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 14 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 15 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 16 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 17 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 18 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 19 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 20 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 21 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 22 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 23 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 24 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 25 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 26 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 27 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 28 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 29 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 30 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 31 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 32 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 33 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 34 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 35 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 36 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 37 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 38 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 39 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 40 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 41 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 42 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch Counter: 43 --> IE.au3 T3.0-2 Warning from function _IEAttach, $_IESTATUS_NoMatch "C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1899) : ==> The requested action with this object has failed.: If IsObj($oObject.document.getElementById($sID)) Then If IsObj($oObject.document^ ERROR ->20:28:28 AutoIt3.exe ended.rc:1 +>20:28:28 AutoIt3Wrapper Finished. >Exit code: 1 Time: 91.45
-
Hello @Neutro Thank you very much for the input. This was the simplified version of the code that was meant to represent the problem. I know that I have to and check returned values when coding. However this did not solved the issue because if the code would work, then it would just give an error and then exit the script after looping the same number of times anyway. Also, your suggested version also crashed because the script critically fails before returning any value - in the middle of a freaking function - out of the thin air It just blows my mind. Try running both versions couple of times by yourself, I think you will be surprised. Different versions will loop different number of times but the number of loops passed will stay the same before crashing. It seems that IE object ($oObject variable in IE.au3 library functions) is getting destroyed/gone/lost in the middle of the run and that is why critical error occurs. I tried running my version on the different computer. It crashed after looping 46 times now. EACH TIME I RAN IT. Your version crashed after running 42 loops. Also - EACH TIME I RAN IT. What the hell, guys? Maybe it is some kind of dedicated memory for process filling up or other systemic issue? So... Are there any other suggestions? I am desperate at this point...
-
Hello, I am writing script that would go through list and for each entry would gather some data from Web Page. The problem is that at the same list entry script crashes and gives an error "The requested action with this object has failed" This is the example of the code that at least for me crashes every time exactly after looping 40 times with the same error. It seems that script crashes after certain number of function calls has been made. #include <IE.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <File.au3> #include <Excel.au3> #include <Word.au3> #include <ButtonConstants.au3> #include <Array.au3> #include <FileConstants.au3> #include <Date.au3> #include <ColorConstants.au3> #include <GuiTab.au3> Local $SearchButton For $i = 1 to 1000 Local $oIEObject = _IECreate("https://www.google.com", 1) _IELoadWait($oIEObject, 100) $TxtField = _IEGetObjById($oIEObject, "lst-ib") $TxtField.value = "lalala" $SearchButton = _IEGetObjByName($oIEObject,"btnK") _IEAction($SearchButton, "focus") _IEAction($SearchButton, "click") _IELoadWait($oIEObject, 1000, 10000) $oIEObject = "" WinClose ("lalala") ConsoleWrite ("Counter: " & " " & $i & @CRLF) Next I tried to remove every library except IE.au3 and it passes 40 mark but I guess at some point it would crash anyway. However this is not an option since I need these libraries for code to work. Does anyone of you has any idea why that happens and is there any way to fix it? I tried searching online without any luck.