simsrm Posted October 23, 2014 Share Posted October 23, 2014 My script was running beautifully for two weeks. Then the mouse stopped working in the pop-up windows. It gets to a certain point and then stops. The script just sits there. I have rebuilt from scratch, etc... not sure what is happening. Below is are the code and then the system information. Windows 7 professional 64 bit. #region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=00000409) --- #region --- Internal functions Au3Recorder Start --- Func _Au3RecordSetup() Opt('WinWaitDelay',100) Opt('WinDetectHiddenText',1) Opt('MouseCoordMode',0) Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '') If $aResult[1] <> '00000409' Then MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(00000409->' & $aResult[1] & ')') EndIf EndFunc Func _WinWaitActivate($title,$text,$timeout=0) WinWait($title,$text,$timeout) If Not WinActive($title,$text) Then WinActivate($title,$text) WinWaitActive($title,$text,$timeout) EndFunc _AU3RecordSetup() #endregion --- Internal functions Au3Recorder End --- $DashCounter = 0 $LoginCounter = 0 While $LoginCounter < 2 $LoginCounter = $LoginCounter +1 $DashCounter = 0 _WinWaitActivate("Start","") MouseClick("left",34,16,1) _WinWaitActivate("Start menu","All Programs") MouseClick("left",89,22,1) _WinWaitActivate("Web Based CMMS Software | PM Software | Facility Maintenance | Login - Windows Internet Explorer","Address Combo Contro") sleep(6000) Send("xxxxxxxxxxx{ENTER}") Sleep(20000) MouseClick("left",425,77,1,20) Sleep(3000) _WinWaitActivate("http://www.maintenanceconnection.com/?s=34B3B746866800134E561993B07F2993D6BCF855B695316F6DA1FCA - Windows Internet Explorer","Address Combo Contro") sleep(12000) MouseClick("left",410,75,1) sleep(8000) _WinWaitActivate("My Dashboard -- Webpage Dialog","") While $DashCounter < 42 $DashCounter = $DashCounter + 1 sleep(3000) MouseClick("left",82,531,1) Sleep(10000) MouseClick("left",65,544,1) Sleep(20000) MouseClick("left",92,530,1) Sleep(20000) MouseClick("left",116,531,1) Sleep(20000) MouseClick("left",119,545,1) Sleep(20000) MouseClick("left",109,561,1) Sleep(20000) MouseClick("left",90,587,1) Sleep(20000) MouseClick("left",80,602,1) Sleep(20000) MouseClick("left",75,614,1) Sleep(20000) MouseClick("left",75,628,1) Sleep(20000) MouseClick("left",73,642,1) Sleep(20000) MouseClick("left",63,657,1) Sleep(20000) MouseClick("left",61,672,1) Sleep(20000) MouseClick("left",66,689,1) Sleep(20000) MouseClick("left",64,702,1) Sleep(20000) MouseClick("left",64,716,1) Sleep(20000) MouseClick("left",58,730,1) Sleep(20000) MouseClick("left",58,738,1) Sleep(20000) MouseClick("left",58,740,1) Sleep(20000) MouseClick("left",58,755,1) Sleep(20000) MouseClick("left",57,768,1) Sleep(20000) MouseClick("left",57,785,1) Sleep(20000) MouseClick("left",61,797,1) Sleep(20000) MouseClick("left",61,808,1) Sleep(20000) MouseClick("left",66,810,1) Sleep(20000) MouseClick("left",63,824,1) Sleep(20000) MouseClick("left",61,840,1) Sleep(20000) WEnd ProcessClose("iexplore.exe") sleep(1000) ProcessClose("iexplore.exe") sleep(1000) ProcessClose("iexplore.exe") sleep(1000) ProcessClose("iexplore.exe") WEnd #endregion --- Au3Recorder generated code End --- System Information -------------------------------------------------------------------------------------------- OS Windows 7 Professional x64 Edition 6.1 (build: 7601) Service Pack 1 BIOS Version Dell Inc. A16 Last booted 10/23/2014 7:34 AM Computer Name CROTHALL-PC Computer Description Crothall-PC Interactive User Crothall-PCCrothall Default Browser Internet Explorer Default Browser Path C:\Program Files\Internet Explorer\iexplore.exe Default Browser Version 10.00.9200.17116 Device screen 1024 x 768 x 32 CPU Information ----------------------------------------------------- CPU Name Intel® Core i5-3470 CPU CPU Clock 3192 MHz CPU Description Number 4 Level 6 Model 58 Stepping 9 CPU Usage 5% Memory Information ------------------------------- Physical Memory Size 3.95 GB Physical Memory Used 1.32 GB Physical Memory Used % 33% Physical Memory Free 2.63 GB Physical Memory Free % 66% Commit Memory Size 7.90 GB Commit Memory Used 1.62 GB Commit Memory Used % 20% Commit Memory Free 6.28 GB Commit Memory Free % 79% Disk Drives Drive Size Free % in use ------------------------------------- C: 452.10 GB 410.06 GB 10% D: 574.43 MB 0 KB 100% Processes (Top 5 per CPU) Name CPU% Memory ------------------------------------ System Idle Process 95% System 2% LMI_Rescue_srv.exe 1% 48.54 MB LMI_Rescue_srv.exe 1% 103.52 MB dwm.exe 1% 140.38 MB Events (Last 5 Errors) Type Generated Source Event ID --------------------------------------------------------------------------- 10/23/2014 7:36 AM WinMgmt 10 10/23/2014 7:34 AM Microsoft-Windows-WLAN-AutoConfig 4001 10/23/2014 7:33 AM Microsoft-Windows-User Profiles Service 1530 10/23/2014 3:19 AM WinMgmt 10 10/23/2014 3:18 AM System Restore 8210 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 23, 2014 Moderators Share Posted October 23, 2014 I have rebuilt from scratch, etc... not sure what is happening. Neither are we, since you don't have an ounce of error checking in your script. You should be doing some sort of check after every action you take, either using @error (helpfile) or checking for the existence of a window if you're opening a new one. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
simsrm Posted October 23, 2014 Author Share Posted October 23, 2014 So I am a amateur. But how do I get the errors or tracking. I was trying to figure out if there was a debug or something. Link to comment Share on other sites More sharing options...
Bert Posted October 23, 2014 Share Posted October 23, 2014 I see you done lots of work here however have you looked at using IE.au3? You could remove all the mouse clicks and make you script much more stable. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
simsrm Posted October 23, 2014 Author Share Posted October 23, 2014 (edited) I need the mouse clicks to select the different areas in the explorer and create a rolling dashboard. I only have 7 posts for the day so if I stop posting for today I just ran out of time Edited October 23, 2014 by simsrm Link to comment Share on other sites More sharing options...
simsrm Posted October 23, 2014 Author Share Posted October 23, 2014 Neither are we, since you don't have an ounce of error checking in your script. You should be doing some sort of check after every action you take, either using @error (helpfile) or checking for the existence of a window if you're opening a new one. So how do I create a log event. Never had this problem before or needed to debug. usually pretty simple. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted October 23, 2014 Moderators Share Posted October 23, 2014 That is why I pointed you to the helpfile. The helpfile states that almost every action in AutoIt returns something. So often, the syntax would be something like this: pseudo: <action1> If @error Then <Do something to correct the error> Else <action2> EndIf That being said, DarthCookieMonster is correct: with so many mouseclicks (vs. ControlClick, for example), you are going to find it nigh impossible to do proper error checking. MouseClick is simply a "best effort" type of function. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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