Jump to content
Sign in to follow this  
Yaunny

Moving the mouse in a 3D game window

Recommended Posts

Yaunny

Hey, I've been learning AutoIt, but I've run into an issue...

I have a 3D offline game ( so it isnt cheating) that I'm trying to automate to do something. For anyone who may have played, the game is Portal.

The issue here is that none of the Mouse Move commands work in the game window, in fact, it always returns the coordinates at the center, ie: if I have res=1280x1024, and the game is windowed, both of my coords are 640x512, all the time.

My theory is that the game has a mouse movement system like an fps.

The mouse is trapped at the center of the screen.

There is a software cursor. When the mouse is moved, it gets sent back to the center and the software cursor is updated with the amount the mouse moved.

If this is the case, how can I get the position of the software cursor?

I hope you understood all that.

TL;DR

The mouse in the game is "trapped" at the center of the screen, so i cant figure out how to automate the mouse movement to turn the screen where I want it.

the Window Info always says position: 640,512.

Share this post


Link to post
Share on other sites
Sobiech

Look into "Opt("MouseCoordMode" ,2)"

and

AutoITWindowInfor / options / coordmode / client

Btw. I am not sure that game isnt offline, but i dont care :D


This world is crazy

Share this post


Link to post
Share on other sites
Yaunny

Look into "Opt("MouseCoordMode" ,2)"

and

AutoITWindowInfor / options / coordmode / client

Btw. I am not sure that game isnt offline, but i dont care :D

That may work, but I still cant find the coordinates of where I need to click in-game

Even with setting coordmode to client, the position: on Window Info stays the same..

Share this post


Link to post
Share on other sites
GodForsakenSoul

what in god's name are you trying to automate in PORTAL!?

Share this post


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
Sign in to follow this  

×