Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Misc.au3>
- #include <GuiConstants.au3>
- $GUICoord = GUICreate('Mouse Finder Tool', '150', '20', '-1', '-1', '-1', '128')
- Global $CoordInput = GUICtrlCreateInput('', '0', '0', '150', '20', '1')
- GUICtrlSetFont($CoordInput, '9', '600', '', 'Arial')
- GUICtrlSetState($CoordInput, $GUI_DISABLE)
- GUISetState(@SW_SHOW, $GUICoord)
- WinSetOnTop($GUICoord, '', '1')
- AdlibRegister("RefreshCoord", 50)
- Local $hDLL = DllOpen("user32.dll")
- While 1
- If _IsPressed("01", $hDLL) Then
- $Pos = MouseGetPos()
- ConsoleWrite("X: " & $Pos['0'] & " Y: " & $Pos['1'] & @CRLF)
- While _IsPressed("01")
- Sleep(1)
- WEnd
- EndIf
- If GUIGetMsg() = $GUI_EVENT_CLOSE Then ExitLoop
- WEnd
- DllClose($hDLL)
- AdlibUnRegister("RefreshCoord")
- GUIDelete($GUICoord)
- Func RefreshCoord()
- $Pos = MouseGetPos()
- GUICtrlSetData($CoordInput, "X: " & $Pos['0'] & " Y: " & $Pos['1'])
- EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement