Jump to content

beegee

Members
  • Posts

    3
  • Joined

  • Last visited

beegee's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Final update. I hope this helps someone else sometime who was struggling as much as I was with this randomly appearing problem. The SendKeyDelay seems to have resolved the problem. My overnight test did 8000 loops with no trouble. It appears that for my troublesome testbed system I need to have the delay set to 200ms (I made it a configuration file item so I don't need to recompile my test scripts). I tried at 100ms and my test suite still had some hang / stalls on File->Open. Cheers.
  2. Update: I've been fighting this problem for several days now, but thanks to a few other posts I read, I had some ideas. For those with a similar problem, this will explain what I tried and what's worked (so far) First, I split the file and the open and added short sleeps: CODE Send("!f") Sleep(200) Send("o") Sleep(200) ... Next, when I proved this worked, I moved back to my original File Open mechanism, removed the sleeps and I modified this environment var instead: CODE Opt("SendKeyDelay", 200) So far, in a loop of nearly 500 iterations, I have not seen the failure! So it seems that the stall / hang on File->Open has something to do with the delay after sending data to the dialog. Tonight I will run with a longer loop to ensure the problem is gone. I will follow up to let you know how it turns out.
  3. Sorry for re-opening an old thread everyone, but I seem to be having nearly the exact same problem as SmokeyDaBears and I cannot seem to find any more information about this issue! I am using AutoIT (v3.2.12.1) as a test tool for my application. I wrote my test scripts on two separate machines, and on either of those machines they run cleanly without any problem, whether running in .au3 format or compiled script format. However, when I moved to my customer test bed (which is identical to one of my two dev machines except that it has 1Gb less ram) I get the same kind of occasional stall or hang on File->Open inside my application. (Error happens with both script and compiled script.) I call it an occasional failure because it seems to randomly happen. Sometimes it will happen 2-3 times when running 10 times, othertimes not at all when I run the script 20 times! Based on logging messages that I have added to my script, I know that the script is running away even though the application is paused - i.e. that the script continues to run even though the application is hung at the File->Open menu. I even added a return code check for each item from ControlSetText on and they ALL pass! CODE; 1. start my app Run("myApp.exe") $retval = WinWaitActive($TITLE_MAIN_WIN, "Ready") if ($retval == 0) then Exit(-1) EndIf ; 2. File->Open window (this bit does some extra checking to try to make sure it waits for the dialog to be open!) Send("!fo") ; $TITLE_OPEN = "Open" if not WinActive( $TITLE_OPEN ) Then WinActivate( $TITLE_OPEN ) EndIf $retval = WinWaitActive( $TITLE_OPEN,"",2) if (0 == $retval) then WinClose($TITLE_MAIN_WIN) WinWaitClose($TITLE_MAIN_WIN, "", 2) exit(-1) EndIf ;put image file name File name edit box, click Open button ;Edit1 is the field to put in the filename in. It is right since my script usually works ControlSetText($TITLE_OPEN, "", "Edit1", $imagefile) ;Button2 is the "Open" button - I have the right button since my script usually works ControlClick($TITLE_OPEN, "", "Button2") ; Do other processing - which my script definitely gets to even when the application is still waiting on the File Open dialog. Can anyone help? To summarize, my application is hanging at the File->Open dialog box, with no text entered in the filename field. The script keeps right on going, thinking that it has already entered the filename and clicked on OK. Thanks.
×
×
  • Create New...