Jump to content
Sign in to follow this  

Clicking grid

Recommended Posts


I wouldn't even know where to start with this code, but what I need is a clicking grid that extends from corner to corner of the screen, has a squared grid so like a ton of 20x20 squares inside of it, and a transparent background and slightly opaque lines for the grid itself (this lets you easily see behind it). Then, its purpose would be to record a mouse path, like you would click in one area and then it would record the path of the mouse as you move it into a .ini that could be called with some form of send("").

Not asking for someone to do this for me, (although that would be amazin :whistle:), just wondering if It can be done, and what I should use to do this. Even if you can just tell me that it is possible to record and call a mouse path like I described.

Share this post

Link to post
Share on other sites

1) Yes, it is possible.

2) The transparent grid thing is possible (search the forum for drawing lines on the screen or sth similar).

3) Recording the path of the mouse as easy as ABC.

Some code to play around with: (Assuming you want 20 x 20 pxls sectors)

some recording stuff:

Func _GetSectorId()
   $SectorLen = 20
   $pos = GetMousePos()
   $pos[0] = Int($pos[0]/$SectorLen)
   $pos[1] = Int($pos[1]/$SectorLen)
   Return StringRight("000"&$pos[0], 4) & StringRight("000"&$pos[1], 4)

Global $prevsec = "", $currsec = ""
While 1
   $currsec = _GetSectorId()
   If $prevsec <> $currsec Then
      $prevsec = $currsec 
      FileWriteLine("log.txt", $currsec)
oÝ÷ Ú·©¬¬¶çß².ÖÞ²)©ä¢r­æ¢ëmërÚ+ÛÙ¨½ëazj.±ëh¶¦×ezíërÚ+jëh×6Func _GetMousePosFromSecId($id)
   Loal $ret[2]
   $ret[0] = Int($id/10000) * 20
   $ret[1] = Mod($id, 10000) * 20
   Return $ret

Note: My AutoIt is rusty. Above code snippets have not been tested. Some function names may be incorrect. Some newer functions may not be utilised.

grid stuff:

Drawing lines on screen:


Should be simple after this. =)


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.