Jump to content

AutoIt scripts not working in Windows 10


Recommended Posts

Hi experts, 

I created the following script and was running in windows 7 for quite few months and it was working fine.  But when i tried to run the script on windows 10, i am facing the following issues:

 

 

 

While True
     If (@HOUR = '09' And @MIN = '14' And @SEC = '59' ) Or (@HOUR = '09' And @MIN = '19' AND @SEC = '59') 

AutoItSetOption("MouseCoordMode" ,0)
WinActivate("AmDat")
Sleep(200)

mouseclick("left", 9, 257, 1, 0)

Sleep(250000)
     EndIf

WEnd

 

 

 

The window "Amdat" is not coming to focus

The mouse is not clicking on the coordinates

I even tried to omit the winactivate, and  click directly using screen coordinates, on the required button. I find the mouse cursor moving to the coordinates , but  not clicking. i tried using all possible mouse click methods, still the mouse is just not clicking, I t happens with some other windows as well.

I tried on calculator and working.

 

Any help is highly appreciated.

Link to post
Share on other sites

You should try without changing MouseCoordMod Check if you still have issue. 

 

If you are disturbed by the active windows position you can do a WinMove to be sure nothing will fail. Also that will confirm you are using the correct windows name. If you dont success to move the windows then work on this way.

 

Cheers :) 

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to post
Share on other sites

Thanks FrancescoDiMuro for your quick response.

Can u please help me with the second part of my problem:

I omitted the winactivate function and and manually kept the window active. Then used screen coordinate mode to fetch the coordinates of the button on which i want the mouse to click. After running the code, i could see the mouse cursor  moving on to the button, but not clicking. I tried the same procedure by opening another 2 -3 windows.  The same story, the mouse not clicking.

Please note that the OS is Windows 10. Is there any problem with Windows 10 and AutoIt.

Link to post
Share on other sites
4 minutes ago, TVR said:

Please note that the OS is Windows 10. Is there any problem with Windows 10 and AutoIt.

Nop there is no problem. It s gonna be easy to solve.

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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.

×
×
  • Create New...