Findet jemand den Fehler im Script (habe leider kaum Ahnung):
#include <GUIConstants.au3>
GUICreate("Test",300,300)
$cordx = 10
$cordy = 40
$A = GUICtrlCreatePic(@ScriptDir & "\Neu Bitmap.bmp",$cordx,$cordy,30,30)
GUICtrlSetCursor($A,0)
$Test = 0
$xm = 0
$ym = 0
Func schieben($x,$y,$Objekt)
$B = GUIGetCursorInfo("Test")
If $B[2] = 1 And $B[4] = $Objekt Then
If $Test = 1 Then
$x2 = $B[0] - $xm
$x = $cordx + $x2
$y2 = $B[1] - $ym
$y = $cordy + $y2
GUICtrlSetPos($Objekt,$x,$y,30,30)
EndIf
$xm = $B[0]
$ym = $B[1]
$Test = 1
EndIf
If $B[2] = 0 Then
$Test = 0
EndIf
EndFunc
GUISetState()
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
schieben($cordx,$cordy,$A)
WEnd
Wie gesagt ich habe kaum Ahnung und möchte auf die Funktion "schieben"
nicht verzichten, um im eigentlichen Script die Übersicht zu bewahren. (mehrere Bitmaps) Danke!