#include <GuiEdit.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
HotKeySet("{F1}", "Save")
HotKeySet("{F2}", "start")
HotKeySet("{F3}", "clear")
HotKeySet("{F4}", "save_file")
HotKeySet("{F5}", "load")
$GUI = GUICreate("", 103, 183, 0, 0, $WS_POPUP, $WS_EX_TOPMOST)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 129, 209)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Save()
$apos = MouseGetPos()
_guictrledit_inserttext($edit1, $apos[0] & "," & $apos[1] & @CRLF)
EndFunc
Func save_file()
$hFile = FileOpen("coords.txt", 2)
FileWrite($hFile, GUICtrlRead($Edit1))
FileClose($hFile)
EndFunc
Func load()
$hFile = FileOpen("coords.txt", 0)
$sChars = FileRead($hFile)
GUICtrlSetData($edit1,$sChars)
FileClose($hFile)
EndFunc
Func clear()
GUICtrlSetData($edit1, "")
EndFunc
Func start()
$line = _guictrledit_getlinecount($edit1)
For $i = 0 To $line - 2
$coord = _guictrledit_getline($edit1, $i)
$coord = StringSplit($coord, ",", 2)
If NOT @error Then
MouseMove($coord[0], $coord[1],10)
EndIf
Next
EndFunc