ivannikolaisson Posted April 25, 2018 Share Posted April 25, 2018 Working with a script that runs some simulations. Problem is that the script should continue after the text "done" has appear. The main problem is that "done" keeps flashing while the simulations are still running, so the script assumes that they(simulations) are done and continues the procedure, this should not happen. Question is; How is it possible to make the window wait untill done has been visable for at least 1 sek. This is the script ControlClick("SimLight","Calculate",3210) ; Calculate WinWait("SimLight","Done") ; Waiting for calculations to be done(This is the problem) Sleep(500); ControlClick("SimLight","Graph",3223) Regards Ivan Nikolaisson Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 25, 2018 Moderators Share Posted April 25, 2018 ivannikolaisson, Welcome to the AutoIt forums. How often does the "Done" flash? I suggest using a loop adjusting your timing so that you stand a good chance of not always hitting the moment when it is visible and then incrementing a counter to get 3 consecutive hits each at least 500ms apart. M23 ivannikolaisson 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
ivannikolaisson Posted April 25, 2018 Author Share Posted April 25, 2018 @Melba23 Thanks for your reply, a single simulation lasts for around 10 seconds. Within those 10 seconds the done flashes around 20 times. I understand your suggestion and it might work. However, I'm running many simulations (around 5000) so there is a chance some of them might be prone to error if I use your suggested method. I would however like to try. Can you give an example on a counter? Regards 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