Moinsen,
habe mir das recht einfach vorgestellt um den Quellcode nicht zu voll zu proppen ![]()
Wenn ich mein kleines Programm aufrufe dann verschiebt er das BIld nur 1 mal und nicht die ganze For Schleife....
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 614, 442, 230, 166)
$Start = GUICtrlCreateButton("Start", 8, 408, 507, 25, 0)
$Beenden = GUICtrlCreateButton("Beenden", 520, 408, 83, 25, 0)
$lblPunkte = GUICtrlCreateLabel("Punkte :", 0, 8, 47, 17)
$Punkte = GUICtrlCreateLabel("", 48, 8, 200, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$bild = "C:\xxxxxxxxxxxxxxxxx\ehec.gif"
$bildw = 44
$bildh = 20
$x1 = 24
$x2 = 536
$y1 = 40
$y2 = 360
$xx = Random($x1,$x2)
$yy = Random($y1,$y2)
$Pic1 = GUICtrlCreatePic($bild, $xx, $yy, $bildw, $bildh, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Start
For $i = 1 to 10 Step 1
$newx = $xx+1
$newy = $yy+1
GUICtrlSetPos($Pic1, $newx, $newy)
GUICtrlSetData($Punkte, $newx&" "&$newy)
sleep(200)
next
Case $Beenden
Exit
Case $Punkte
EndSwitch
WEnd
habe ich da irgendwo einen ansatz Fehler?
Zeile 39 ist für mich zum debuggen ![]()