Fatma Posted October 17, 2018 Posted October 17, 2018 Hi all, I'm using Autoit to run some experiments for research. I'm automating different activities and measuring the activities response times in a Remote Desktop setup. To find the response time, the script log the time, do the task (e.g., run an application), then use WinWaitActive() to ensure the application window has appeared on the display, then log the time again, and measure response time as the difference between the two logged times. However, I'm wondering how WinWaitActive() function work, how does it check that the window has appeared. I want to know if it is a fair way to measure the response time the way I mentioned above, I cannot make assumptions without understanding what WinWaitActive() does to ensure the application window has appeared. I understand Autoit is not open source any more, but I'm wondering if any one have insights on how the function work, a high-level understanding would be useful as well. Thanks a lot and I appreciate any help. Fatma
jdelaney Posted October 17, 2018 Posted October 17, 2018 (edited) It's all in the helpfile...click the links: winwait winwaitactive WinGetState - to get the definitions of window states timerinit timerdiff Additionally: https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm Edited October 18, 2018 by jdelaney IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Fatma Posted October 18, 2018 Author Posted October 18, 2018 Quote Additionally: https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm @jdelaney Thanks much for your reply and for sharing the link. I looked at the link, based on the 4 Modes, does it mean Autoit capture the display and do some image processing to get the window title, and if it matches the title in WInWait() or WinWaitActive() the function returns? I thought Autoit might be using some Windows APIs to figure out that the application window has opened.
Fatma Posted October 18, 2018 Author Posted October 18, 2018 Quote I looked at the link, based on the 4 Modes, does it mean Autoit capture the display and do some image processing to get the window title, and if it matches the title in WInWait() or WinWaitActive() the function returns? I thought Autoit might be using some Windows APIs to figure out that the application window has opened. I just googled Windows APIs to retrieve a Windows title and there is a function called GetWindowText(), does WinWaitActive() use the GetWindowText() call to figure out if the application window has appeared on the display? Sorry, I rarely use Windows so I'm not very familiar with it, I should have googled the API before posting.
careca Posted October 21, 2018 Posted October 21, 2018 Im not sure on the exact inner workings of it, but i know it can use more than a simple titlebar text, it can use the class, handle and others or even a combination. It's fast enough, never had delays where a window shows up and the function lags, only if the window opens but has not loaded yet, thus, not ready. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
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