Jump to content

Script made on Win 11, doesn't work on Win 10


Recommended Posts

Hello,
I made a tool for automating some stuff, you know, just click some windows, input some file paths in the choose files windows and stuff like that.

Now, I developed it in a windows 11 sandbox (More info, someone might find this useful), and i tried to run it on a Win 10 machine. Mouse moves, but is unable to select text areas to input file paths and so on. Basically some functions don't work.

Is it that windows handles are different or something like that? Do I have to recapture every window handle and adapt it?

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Link to comment
Share on other sites

2 minutes ago, Newb said:

Is it that windows handles are different or something like that?

Windows handles are most certainly different but this is not the problem. What it really matters in windows automation is if the classname of the controls are changing. For example on Win 11 notepad edit area is a RichEditD2DPT control but on previous versions of Windows it's a basic Edit control.

Link to comment
Share on other sites

26 minutes ago, Andreik said:

Windows handles are most certainly different but this is not the problem. What it really matters in windows automation is if the classname of the controls are changing. For example on Win 11 notepad edit area is a RichEditD2DPT control but on previous versions of Windows it's a basic Edit control.

Dang, I suspected that. Well, looks like I'll have to recapture all the windows handles and make a switch for win 10/11.

Does in any case UIAutomation helps in whatever way of standardizing these controls so I don't have to do differentiate for each OS version?

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Link to comment
Share on other sites

53 minutes ago, Newb said:

Does in any case UIAutomation helps in whatever way of standardizing these controls

Possibly, you need to run UIASpy in both Win10 and Win11, see what is identical and what is different, and use the criteria accordingly.

Link to comment
Share on other sites

20 hours ago, Nine said:

Possibly, you need to run UIASpy in both Win10 and Win11, see what is identical and what is different, and use the criteria accordingly.

Well, as far as it may interest you, I ended up thinking "Heck, they're the same thing how this is possible", I then proceeded to install the full autoit+scite and running from scite works without changing a single bit of code.

For what it concerns me, I'm quite ok like this as I got my result. But it's quite concerning for who have to distribute their program out there, since this could lead to software non working on other systems.

I'm a compulsive poster. When I post something, come to read it at least 5 minutes later after the posting, because I will edit it. I edited even this signature a few minutes later after I wrote it.

Link to comment
Share on other sites

When you installed the full version did you upgrade to a newer version of Autoit? If so, you may have picked up important updates that un-broke your script. It wouldn't be uncommon to need to update scripts for compatibility and distribution when there are OS changes. 

Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...