verto Posted March 1, 2007 Share Posted March 1, 2007 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 ), 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. Link to comment Share on other sites More sharing options...
nfwu Posted March 4, 2007 Share Posted March 4, 2007 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) EndFunc Global $prevsec = "", $currsec = "" While 1 $currsec = _GetSectorId() If $prevsec <> $currsec Then $prevsec = $currsec FileWriteLine("log.txt", $currsec) EndIf Wend 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 EndFuncNote: 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:http://www.autoitscript.com/forum/index.ph...mp;#entry171287Should be simple after this. =)#) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now