Jump to content

Recommended Posts

Posted

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

Posted (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 by Earthshine

My resources are limited. You must ask the right questions

 

Posted
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

Posted
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.

Posted

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

 

  • 1 month later...
Posted

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.

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...