hlcit Posted August 19, 2009 Share Posted August 19, 2009 Hi, I'm new to AutoIt and was wondering if I could have some advice. I am using AutoIt at work running tests overnight. While running the test I have all screensavers and power options turned off. I also have the monitor display turned off. I set the test to run over night but it seems to stop after 2 hours and then starts again when I come in to work the next morning and open the log file to see what has happened. What is it that could be causing my script to pause? It is essentially a large loop that just mimicks a humans activity on another application (just pressing buttons and entering a few values). It doesn't stop doing something new but something it has already done a few times. Thank you for your help in advance! Link to comment Share on other sites More sharing options...
herewasplato Posted August 19, 2009 Share Posted August 19, 2009 Does the code or the app being acted on depend on a networked resource? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
hlcit Posted August 19, 2009 Author Share Posted August 19, 2009 Does the code or the app being acted on depend on a networked resource?Hi,No everything is local on the C:\ drive although the program that is being tested is connected to one of the COM ports Link to comment Share on other sites More sharing options...
herewasplato Posted August 19, 2009 Share Posted August 19, 2009 Hi,No everything is local on the C:\ drive although the program that is being tested is connected to one of the COM portsToo bad - that was gonna be the easy thing to fix if some domain controller was terminating your logon at night.You should change your code to log most every line's success or failure... then you will know the offending line and can track down the cause.I'm going to guess that there is still some power setting somewhere kicking in... Not all power saving apps consider "scripted activity" as a human at the computer. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
hlcit Posted August 19, 2009 Author Share Posted August 19, 2009 Too bad - that was gonna be the easy thing to fix if some domain controller was terminating your logon at night.You should change your code to log most every line's success or failure... then you will know the offending line and can track down the cause.I'm going to guess that there is still some power setting somewhere kicking in... Not all power saving apps consider "scripted activity" as a human at the computer.I have looked at all the power setting windows will let you change and have them all turned to off or never. Are there any that you know of apart from the screen saver and its corresponding power options ( monitor, hard disks and standby )?It has paused each time now (3) and it stops at different points each time so I can't even tell which bit of the script is pausing.What is your advice on how to continue trying to track this down?Thank you Link to comment Share on other sites More sharing options...
herewasplato Posted August 19, 2009 Share Posted August 19, 2009 ... it stops at different points each time ...It stops at different places within the script? Hmmm, that seems to point to some a power saving event. (I know, they are turned off :-)Is this a laptop of desktop... laptops sometimes have a power saving app in addition to the operation system ones.Do the operation system event logs indicate anything around the time that this happens?Can you connect to this office computer from your house via a VPN? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
hlcit Posted August 19, 2009 Author Share Posted August 19, 2009 I know thats the confusing thing! Do you think turning the monitor off would make a difference. It is a work desktop computer, running XP not vista. I don't know if I can VPN at all, it's a pretty security intensive work place, plus I wouldn't know how to do it! I've looked at the event viewer. The only thing that I can find is in security where there are loads of entries called 'Success Audit', category 'Logon/Logoff'. No time stamps to the entries seem to correspond to when my script pause Thank you for your help Link to comment Share on other sites More sharing options...
herewasplato Posted August 19, 2009 Share Posted August 19, 2009 ... Do you think turning the monitor off would make a difference. ...No, but you might have to leave it on and run the script a few hours before you go home. Sit there and watch for it to fail. :-( [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
ResNullius Posted August 19, 2009 Share Posted August 19, 2009 I set the test to run over night but it seems to stop after 2 hours and then starts again when I come in to work the next morning and open the log file to see what has happened.Are you saying that just opening the log file causes the script to resume all by itself? And does it pick up from where it stopped?If so, sounds like either an WinWait or a WinWaitActive problem. What app does the log file open in, and is the title/text of that window in any way related to wait events in your script? Link to comment Share on other sites More sharing options...
hlcit Posted August 20, 2009 Author Share Posted August 20, 2009 Are you saying that just opening the log file causes the script to resume all by itself? And does it pick up from where it stopped?If so, sounds like either an WinWait or a WinWaitActive problem. What app does the log file open in, and is the title/text of that window in any way related to wait events in your script?I'm not sure if it is opening the log file or just the fact that I have turned the monitor back on and moved the mouse. The log file is in the same directory as the script running. Each time it starts again from where it paused, although it pauses at different points each time.The only WinWaits that I have are WinWaitClose. I thought this might be the problem earlier so I changed them all to waiting until WinGetState is a certain value. The log file opens in Notepad which has nothing similar to the app that I am using.Thank you for your help 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