Hallo,
ich würde gerne eine Art Paint in Autoit Programmieren,wie würdet ihr dies machen?
LG Pceumel
Hallo,
ich würde gerne eine Art Paint in Autoit Programmieren,wie würdet ihr dies machen?
LG Pceumel
Also ich würde mir erstmal die _GDIPlus Funktionen anschauen. Damit kannst du nämlich z.B. Linien "malen" von Punkt zu Punkt (" _GDIPlus_GraphicsDrawLine")
.. Nur so als kleiner Starttipp
Ich habe mein Beispiel aus Deiner anderen Frage mal auf Mausbedienung umgeschrieben:
#include<Misc.au3>
#include<GuiConstantsEx.au3>
#include<GDIPlus.au3>
Opt('MouseCoordMode', 2)
_Main()
Func _Main()
Local $hGUI, $hWnd, $hGraphic, $hPen, $aPos[2], $aOldPos[2]
Local $width = @DesktopWidth, $height = @DesktopHeight
Local $dll = DllOpen('user32.dll')
$hGUI = GUICreate('GDI+', $width, $height)
$hWnd = WinGetHandle('GDI+')
GUISetState()
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
$hPen = _GDIPlus_PenCreate(0xff00ff00, 2)
$timer = TimerInit()
Do
$aPos = MouseGetPos()
If _IsPressed('01', $dll) Then
_GDIPlus_GraphicsDrawLine($hGraphic, $aOldPos[0], $aOldPos[1], $aPos[0], $aPos[1], $hPen)
If TimerDiff($timer) > 500 Then
_GDIPlus_PenSetColor($hPen, '0xFF' & StringRight(Hex(Random(0, 16777215, 1)), 6))
$timer = TimerInit()
EndIf
EndIf
$aOldPos[0] = $aPos[0]
$aOldPos[1] = $aPos[1]
Until GUIGetMsg() = $GUI_EVENT_CLOSE
; Clean up resources
_GDIPlus_PenDispose($hPen)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_Shutdown()
DllClose($dll)
EndFunc ;==>_Main
Edit: es fehlte noch ein: Opt('MouseCoordMode', 2)
Funktioniert bei mir nicht!
Zum malen musst Du die linke Maustaste gedrückt halten!
Ich nehme alles zurück!