Jump to content

AutoItX slow working after Windows 10 upgrade


poddex
 Share

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");
ObjectAutoIt.AutoItSetOption("WinTextMatchMode",2);
        While ObjectAutoit.WinExists("",WindowHeader) Cycle 
            ObjectAutoIt.WinClose("",WindowHeader);
        EndCycle;
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
Link to comment
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:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

The code from 1st post:

ObjectAutoIt=New COMObject("AutoItX3.Control");
ObjectAutoIt.AutoItSetOption("WinTextMatchMode",2);
        While ObjectAutoit.WinExists("",WindowHeader) Cycle 
            ObjectAutoIt.WinClose("",WindowHeader);
        EndCycle;

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

Link to comment
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
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

i would suspect you have windows issues. when i face the needle in a haystack, i just blast the machine and install clean. all my stuff is backed up and in the cloud so it takes about 8 minutes to install windows 10 from usb

 

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

You wanted help getting auto IT to work properly on your system. And that’s the way to do it. Just because installing all your programs takes a while doesn’t matter. If you don’t want to do it then just use some other scripting language as you suggested and solve your own problem

 

But that won’t change the fact that your windows 10 image has issues and probably has more problems than you are noticing.

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

  • 3 weeks later...
On 11/20/2020 at 8:31 PM, Earthshine said:

I don't want to download your spreadsheet. you can post code here. we can dummy up our own spreadsheets. what antivirus do you use?

Same antivirus as before Windows update 😃 ESET Internet Secirity.

I updated Windows for 1909 - nothing changes, still exprerience the issue.

Yesterday evening MS didn't want update me for 2004, only for 1909 😃

 

Link to comment
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
 Share

×
×
  • Create New...