Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <File.au3>
- HotKeySet("{F2}", "_MousePos")
- While 1
- Sleep(1000)
- WEnd
- Func _MousePos()
- Local $file = FileOpen("test.txt", 1) ;file to write to
- If $file = -1 Then
- MsgBox(0, "Error", "Unable to open file.")
- Exit
- EndIf
- Local $pos = MouseGetPos()
- MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1], 1)
- FileWriteLine($file, $pos[0] & $pos[1])
- FileClose($file)
- EndFunc ;==>_MousePos
Advertisement
Add Comment
Please, Sign In to add comment