Jump to content

AutoItX slow working after Windows 10 upgrade

Recommended Posts

Hello everyone.
I always try to work with old Windows 10 versions as much as possible because I know mane compatibility issues with Windows 10 upgrading. 
But I couldn't do anything else (I got drivers problem), and nothing couldn't help me besides upgrading, so I upgraded from 1807 to 1903.
And...get another problem ūüėÉ
I use AutoitX library in external project like this.

ObjectAutoIt=New COMObject("AutoItX3.Control");
        While ObjectAutoit.WinExists("",WindowHeader) Cycle 
After upgrade I get that this line code 

While ObjectAutoit.WinExists("",WindowHeader)

become extremely low - ~ 20 seconds even if 10 windows open. But before upgrade it takes 0.5 s for a max.

And every time that this code line passes through  - it takes ~20s, (20.115, for example), not less, not more. Something pauses it to work.
How can I diagnose, what is that?
I tried reinstall whole AutoIt, but no results.
Thanks to all.

Edited by poddex

Share this post

Link to post
Share on other sites

I'm not sure this is true for AutoItX as well but IIRC there was a thread regarding slow performance with Windows 10.
Please search the forum an you will find something like this:

I think this problem is solved with the latest beta:


My UDFs and Tutorials:


Active Directory (NEW 2020-10-10 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version - Download
Outlook Tools (2019-07-22 - Version - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version - Download - General Help & Support - Wiki

ADO - Wiki, WebDriver - Wiki


Share this post

Link to post
Share on other sites

The code from 1st post:

ObjectAutoIt=New COMObject("AutoItX3.Control");
        While ObjectAutoit.WinExists("",WindowHeader) Cycle 

does this: when Project Windows closed, it finds all related folder-windows and closes them. Only folders are affected.

By testing slow-error, I found, that first iterations passes quickly, folders closes by it. But after closing last folder WinExists loop got a huge delay (~20 s) - on a line "While ObjectAutoit.WinExists("",WindowHeader) Cycle". So, delay appears at last of loop execution, only AFTER all windows matched for a condition (""",WindowHeader" ) close.
Need help with further diagnostic

Share this post

Link to post
Share on other sites

Ok, I made some diag for this. And found, that I can't even sort opened windows by it's PIDs. I can't select only explorer-related folders for WinExists-condition and WinExists checked title-condition for ALL windows (by logic, yes, but I prove this one more time for me). Some of them caused WinExists function for huge delay described above. imho, it's not effective to see ALL windows, when I want to look for windows of a specific process. But I can't select it. I can get WinList habdles massive, I can get WinGetProcess PID (only one), but I can't point WinExists to look only for Windows caused by specific PID. And I can't to check which handle from WinList is for which PID to close them.
And finally I want to check if this Window EXISTS.
PIDs always changed, ok. But I haven't any ideas for now.
Maybe I'm doing some wrong? It's possible to avoid this delay issue or I must use another script-engine?
I found that WinList function has no delay. This fact shows that delay is exactly in WinExists function, when it "looks inside" a window information.
I found that "While ObjectAutoit.WinExists("",WindowHeader) Cycle" loop cycles as many times as explorer-folders windows are opened. So, WinExists cycles through ALL windows inside itself (not in my code, I see only succeeded loops). So, delay-problem is in WinExists function inside AutoItX library. And I can't trace which window causes it to delay because there is no any verbose (or I didn't find it) inside AutoitX.
Please, anybody, any suggestions will be appreciated.

Edited by poddex

Share this post

Link to post
Share on other sites

Here is a list of WinList[ALL] statement of AutoItX in my code.

Earlier there are no problems with it. But now some window(s) causes a delay. What window can do that?



Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By WilliamasKumeliukas
      I started this project alone in May 2020 as project in my spare time at work, I'm working for a IT compagny that's started opening their services to residential customers few months ago and now my position in the company kinda drifted in the doom and gloom world of repetitive tasks like: Reinstallation of Windows 10.
      The procedure is very repetitive and I started feeling like being a robot which is the main reason I started this project.
      1. Q: Do you want this project to be accomplished with the usage of AutoIT ONLY or 3rd party tools / Scripts (BAT / CMD / VBS) ? A: No, if I cannot find a way using AutoIT to accomplish a task I will move to my Plan B which consist of automating an 3rd party tool to accomplish the affected task until a solution is found. 2. Q: What do I get from helping/collaborating in this project? A: I will personally take the responsability to mention you in the credits of this project. 3. Q: If I have more questions, can I ask? A: Certainly! feel free to ask any questions related to this project! 4. Q: What is the main goal of this project? A: Automating Windows 10 configuration without user interaction needed (as much as possible) ______________________________________________________________________________________________________________________________
      Current progression of the project (more might be added in future)
      ¬ę¬†Blue = Info ||¬†Yellow¬†= Unfinished/Untested ||¬†Purple¬†= Could be better¬†|| Green¬†= Done ||Red = Not Yet Started¬†¬Ľ
      *** Very early Stage ***
      Connect Network Attached Storage(NAS) (Tested & Working - AutoIT only)
      Install Adobe Reader DC, 7zip, Google Chrome (Tested & Working - using 3rd party tool)
      Change OEM Information (Tested & Working - contains both AutoIT version and CMD script)
      Disable ScreenSaver (Require testing AutoIT only)
      Change Computer Name (Require testing AutoIT only) 
      Change Default Browser (Work - using 3rd party tool)
      Change .pdf / .pdfxml from Edge to Adobe Reader DC (AutoIT only)
      Change Edge to Google Chrome as Default Browser (Tested & Working - using 3rd party tool)
      Windows Updates (Currently working on it - AutoIT only)
      Install Office 
      Activate Office (Tested on 2010 & Working - CMD Script)
      Pin to taskbar Excel, Outlook, Word, Chrome (Tested & Working - using 3rd party tool)
      GUI currently featuring the following options 
      - TreeView to check case of desired tasks
      -  Redirect ConsoleWrite with timestamp messages in richedit (errors shown in red text)
                 *** To Do ***
       - Read informations needed for tasks like: OEM, ComputerName, NAS user/password etc... from a file
       - ListView for Windows Updates
       - Probably more
      ***  If this project interest you, Reply here This will greatly help me to see if you'd like this project to become real  ***
      2020.09.21 Update: Since this topic reached over 200+ views without a single interest shown by community, pm me and i'll share with you W10 Configurator script  
      Best Regards,
    • By Danyfirex
      In the past I had problems adding an application as a default for an extension in Windows 10. (It was easy in windows 7 using Registry) But since Windows 8 It requires to do some steps more. I wrote a tool (in other programming language) months ago for handling it. But now I just want to share an AutoIt version.
      Check on GitHub.
    • By Jgladden
      Dan - thanks for all that you do - this stuff is great. 
      Hoping you can assist with an issue we are having now that we have moved to Windows 10/Server 2016. The Chrome interactions were working flawlessly until moving over. Now my code fails when attempting to create the session. As you can see, our Chrome install is not in a standard location but I have validated the path to the binary. I have attached some detail below including system info, console output and the chrome log detail. I have tried several recommendations that have seen in various forums but none have made a difference
      Any assistance you can give would be greatly appreciated. 
      Thanks in advance, 
    • By learner123
      Hi All,
      I am new to this AUTO IT and I have created a script that will open an app,enter pin and copy the code generated to clipboard. My java code call this autoIT script and use the copied generated code from clipboard.
      This works fine when server  window is on focus. My server is an windows server. 
      But when I minimize or disconnect the server, the script opens the app.exe but doesn't copy any value to clipboard.  
      Can anyone help me on this ūüėź
      Run("C:\Program Files (x86)\RSA SecurID Software Token\SecurID.exe")
      Local $hWnd=WinWait("abc - RSA SecurID Token") ; waits until the window is the active window
      $hWin = WinGetHandle("abc - RSA SecurID Token");
      ControlSend($hWnd,"","","1111") ; simulates pressing the Home key
      Sleep(1000) ;
    • By Jahar
      Hi All,
      Please help me on how to fetch date/time of last windows 10 system restore point using autoit? Basically its about querying the last restore point.
  • Create New...