Jump to content

Getting Coords From A Game Window


Recommended Posts

Which OS?

Set a HotKey to call a function. In the function, you record the mouse position from MouseGetPos. Write the values in a file.

Hmm, maybe something like this would work.

$fn = FileOpen("C:\MyLog.txt", 1)  ; This is the log file that the positions will be written.
HotKeySet("#0", "record"); Windows-0  set your own key
HotKeySet("#9", "done")  ; Windows-9   set your own key
Sleep(86400000); Run for up to a day

Func Record()
    Local $desc, $pos
    Global $fn

    $pos = MouseGetPos()
   ; InputBox may cause your program to return to windowed mode. 
   ; Click on the application in the task bar to return to full-screen.  
   ; If that does not work, press Ctrl-Enter to get back to full-screen mode.
    $desc = InputBox("What do you want to call this point?", "Save point")
    if @Error = 0 Then
        FileWriteLine($fn, $pos[0] & ", " & $pos[1] & " - " & StringStripWS($desc,7))

Func Done()
Edited by Nutster

David Nuttall
Nuttall Computer Consulting

An Aquarius born during the Age of Aquarius

AutoIt allows me to re-invent the wheel so much faster.

I'm off to write a wizard, a wonderful wizard of odd...

Link to comment
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...