Jump to content
Sign in to follow this  

Mouse Coordinates Inconsistent

Recommended Posts

I'm writing some code to automatically patch a few games, and for the game Firefall I am using AutoIt to automatically click on the patch/launch game button. Unfortunately, this button is not a control object so I have to use mouse coordinates.

Here is my code:

Func WinWaitActivate($title,$text,$timeout=0)
If Not WinActive($title,$text) Then WinActivate($title,$text)

Opt("MouseCoordMode", 0)
While True
MouseClick("left", 775, 475)

The problem I am experiencing is that the mouse coordinates are inconsistent. If I let this script run for 30 seconds, the first two clicks will usually click on the wrong location, but the third click and beyond will select the right location.

Any ideas? I have seen this for other launcher type applications as well.

EDIT: I have also tried using absolute coordinates in conjunction with the position of the window. This runs into the same problem.

Edited by Sycondaman

Share this post

Link to post
Share on other sites

FirefallPatcher is a game file for the game Firefall?


Correct. There are actually two files that it switches between, Launcher and FirefallPatcher. The window regex works fine (the window will move to the foreground when behind other windows), but the clicking will happen twice at the wrong location and then in the correct location. I have also seen this behavior with the same code but with different windows.

For now I think I'm going to separate click and move and only click when I detect the mouse coordinates are in the correct position, but I'm still curious as to why this would be inconsistent.

Share this post

Link to post
Share on other sites
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...