LucaZF Posted December 14, 2018 Posted December 14, 2018 Hello, I've been implementing a script (fully working on a PC with Windows 7 SP1) to automatise a series of click on a 3rd party software. This works smoothly on my PC (Regional settings, english). For some reason, I have to export my script on a different PC. This PC has GREEK regional settings. I say that because I believe this could be the issue. I attach the code for example. As you can see it is just a WinActivate and 3 clicks. This works very well on my PC, with no issues. Resolution is not an issue as the 3rd party software has a windows that cannot be resized. I checked buttons coordinates, and they are not changing. I tried this on several greek PCs, with different windows version, but no success. Basically, AutoIT manages to activate the window, but the mouse doesn't move. I tried to use ConsoleWrite, and the script executes until the end with no errors. Any good suggestions? Thanks XPairStart.au3
Nine Posted December 14, 2018 Posted December 14, 2018 Hmmm. I'm using French OS with French keyboard and French settings everywhere and I don't have any kind of problem. Have you tried changing language setting and run your script in EN (US) ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Earthshine Posted December 14, 2018 Posted December 14, 2018 (edited) is this a DPI issue? sounds like a windows resolution issue. looking at the code it looks like absolute coordinates so, if their zooming their desktop then all bets are off. it's much more reliable to go after controls and not use mouse clicks. this is the very reason. on a different system, you don't know where the windows starts up.DPI settings aside, mouse clicks are a terrible way to do things reliably. Edited December 14, 2018 by Earthshine My resources are limited. You must ask the right questions
Nine Posted December 14, 2018 Posted December 14, 2018 3 hours ago, LucaZF said: but the mouse doesn't move if it was a resolution issue, at least the mouse would move to the wrong places. 3 hours ago, LucaZF said: I checked buttons coordinates, and they are not changing. I don't think it is related to language setting either, but it is still strange “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Earthshine Posted December 14, 2018 Posted December 14, 2018 (edited) try it with MouseCoordMode set to 1 if it's same DPI and see if you get any different results. it is strange. https://www.autoitscript.com/wiki/MouseCoordMode Edited December 14, 2018 by Earthshine My resources are limited. You must ask the right questions
LucaZF Posted December 14, 2018 Author Posted December 14, 2018 1 hour ago, Earthshine said: is this a DPI issue? sounds like a windows resolution issue. looking at the code it looks like absolute coordinates so, if their zooming their desktop then all bets are off. it's much more reliable to go after controls and not use mouse clicks. this is the very reason. on a different system, you don't know where the windows starts up.DPI settings aside, mouse clicks are a terrible way to do things reliably. Sadly there is no option of using controls as the software is a remote desktop app, and does not have any property for the buttons, so cannot really call them back. I don't think it is a resolution issue (my first guess), because: 1) Mouse cursor doesn't move (should move in the wrong position) 2) My active window has the same size, no matter what screen resolution you have (not a very smart app I'm trying to control...) 3) I interrogated the position of the buttons I click, and they stay the same in relative coordinates (of course, because dimensions of my active window do not change). The other thing I didn't mention is that my window becomes active (from the background comes to the front). What do not happen are the mouse movements and clicks. Very strange.
Earthshine Posted December 14, 2018 Posted December 14, 2018 you can use Send at least, then, to send Tabs to tab to the control you want, then Send Enter. does it at least respond to keyboard commands? My resources are limited. You must ask the right questions
LucaZF Posted January 18, 2019 Author Posted January 18, 2019 Just an update on this: we tried the script on the same machine after formatting and installing Windows in English... It now works. I'm not sure what was causing the problem, but it might be the Windows 7 version in Greek.
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