Ich habe hier auch was. ^^ ist eher n Recorder
in der .ini speichert es die Koordinaten falls du sie auslesen oder einstellungen vornehmen willst.
#include <GuiConstants.au3>
#Include <Misc.au3>
#NoTrayIcon
Opt("GUICloseOnESC", 1)
$gui = GUICreate("Mouse Recorder", 290, 65, 192, 124)
$start = GuiCtrlCreateButton("Aufnahme", 20, 18, 70, 20)
$playPrior = GuiCtrlCreateButton("Start", 110, 18, 70, 20)
$stop = GuiCtrlCreateButton("Stop", 200, 18, 70, 20)
GuiCtrlSetState($stop, $GUI_DISABLE)
$prompt = GuiCtrlCreateLabel("Möchtest du eine gespeicherte Aufnahme abspielen 'Start'", 10, 1, 330, 15)
$checkDown = GuiCtrlCreateCheckBox("Reconstruct with left mouse button held down", 15, 40, 330, 20)
WinSetTrans("Mouse Recorder", "", 0)
GUISetState(@SW_Show)
_WinFade($gui, 0, 250, 15, 5, 0)
WinSetTrans("Mouse Recorder", "", 255)
While 1
$msg = GuiGetMsg()
Select
Case $msg = $start
GuiCtrlSetState($start, $GUI_DISABLE)
GuiCtrlSetState($stop, $GUI_ENABLE)
_WinFade($gui, 250, 100, 15, 5, -1)
$time = @HOUR & "-" & @MIN & "-" & @SEC
Do
$pos = MouseGetPos()
$msg = GuiGetMsg()
IniWrite(@ScriptDir & "\Recording time was " & $time & ".ini", @MON & ":" & @MDAY & ":" & @YEAR, @Sec & " " & "click", "")
IniWrite(@ScriptDir & "\Recording time was " & $time & ".ini", @MON & ":" & @MDAY & ":" & @YEAR, @Sec & " " & $pos[0], $pos[1])
Sleep(20)
If $msg = $GUI_EVENT_CLOSE then Exit
Until $msg = $stop
_WinFade($gui, 100, 250, 15, 5, 0)
GuiCtrlSetState($start, $GUI_ENABLE)
GuiCtrlSetState($stop, $GUI_DISABLE)
Case $msg = $playPrior
$file = FileOpenDialog("Wähle eine .ini Datei die Koordinaten enthält", @DesktopCommonDir & "\Mouse Positions", "(*.ini)", 0)
If Not @ERROR Then
GuiSetState(@SW_DISABLE)
$iniName = IniReadSectionNames($file)
$coords = IniReadSection($file, $iniName[1])
GuiCtrlSetData($prompt, "Esc Beendet!")
If BitAnd(GUICtrlRead($checkDown),$GUI_CHECKED) = $GUI_CHECKED then MouseDown("left")
For $a = 1 to $coords[0][0]
$temp = StringSplit($coords[$a][0], " ")
If $temp[2] = "click" then
MouseClick("left")
Else
MouseMove($temp[2], $coords[$a][1], 3)
EndIf
If _IsPressed("1B") then Exit
Next
If BitAnd(GUICtrlRead($checkDown),$GUI_CHECKED) = $GUI_CHECKED then MouseUp("left")
GuiCtrlSetData($prompt, "Möchtest du eine gespeicherte Aufnahme abspielen 'Start'...")
GuiSetState(@SW_ENABLE)
EndIf
Case $msg = $GUI_EVENT_CLOSE
_WinFade($gui, 250, 0, 15, 5, -1)
Exit
EndSelect
Sleep(50)
Wend
Func _WinFade($hWnd, $iStart, $iEnd, $iStep = 3, $iSleep = 1, $iFade = 1); $iFade - 1 = Fade Out - 0 = Fade In
If $iFade Then
For $iCount = $iStart To $iEnd Step - $iStep
WinSetTrans($hWnd, '', $iCount)
Sleep($iSleep)
Next
Return 1
ElseIf Not $iFade Then
For $iCount = $iStart To $iEnd Step $iStep
WinSetTrans($hWnd, '', $iCount)
Sleep($iSleep)
Next
Return 1
EndIf
Return SetError(1, 0, 0)
EndFunc