NewBieAuto Posted January 11, 2022 Share Posted January 11, 2022 The windows load complete like this: But if I use WinWaitActive ['TITLE'] , When the following window show, the code already running So, how to wait until the complete windows load? Thanks all! Link to comment Share on other sites More sharing options...
levila Posted January 11, 2022 Share Posted January 11, 2022 Its alot easier to help you when you show what exactly you trying to do. but somehow you might try this Do Sleep(1000) Until WinWaitActive("Title") While WinWaitActive("Title") Msgbox("","", "Finished") ExitLoop WEnd Link to comment Share on other sites More sharing options...
Nine Posted January 11, 2022 Share Posted January 11, 2022 You could simply wait until a specific field appears. (ex : see ControlGetHandle) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
junkew Posted January 11, 2022 Share Posted January 11, 2022 Synchronizing is probably one of the most complex things in automating GUI flows " how to wait until the complete windows load" depends on application and your definition of "complete windows load" Find an element you can sync on See if the cursor is changing from hourglass to pointer .... Some functions that can help in this (but maybe a sleep 5000 is enough on the short term) https://www.autoitscript.com/autoit3/docs/functions/ControlGetText.htm https://www.autoitscript.com/autoit3/docs/functions/ControlGetHandle.htm https://www.autoitscript.com/autoit3/docs/functions/PixelChecksum.htm UIA functions WebDriver functions if its HTML sleep nnn milliseconds https://www.autoitscript.com/autoit3/docs/functions/ControlFocus.htm on an element thats last coming up FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
ad777 Posted January 12, 2022 Share Posted January 12, 2022 you can use Control Command to Check if Button or Edit etc . if is Visible: example: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 615, 438, 192, 124) $Button1 = GUICtrlCreateButton("Button1", 88, 136, 81, 33) $Button2 = GUICtrlCreateButton("Button2", 224, 104, 65, 41);button2 GUICtrlSetState(-1, $GUI_HIDE) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Local $state = ControlCommand($Form1, "", "Button2", "IsVisible", "");check if Button2 is Visible if $state = 1 Then ; MsgBox(0,"","Loaded") EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 GUICtrlSetState($Button2, $GUI_SHOW) EndSwitch WEnd iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want. 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