Hey,
Mein Script reagiert nicht mehr nach dem ich Start gedrückt habe.
Ich weiß auch woran es liegt und zwar am sleep .
#include <File.au3>
#include <Array.au3>
#include <GUIConstants.au3>
$width = 375
$height = 354
$po = 1
$time = 30000
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", $width,$height, 223, 148)
$Slider1 = GUICtrlCreateSlider(70,310,209,40)
GUICtrlSetLimit(-1,3000,180000)
GUICtrlSetData(-1,3000)
$stop = GUICtrlCreateButton("Stop",340,315)
$Start = GUICtrlCreateButton("Start",300,315)
GUISetBkColor(0xA6CAF0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$height -= 50
$pics = _FileListToArray(@DesktopDir & "\o","*.jpg",1)
While 1
if $po==0 Then
$bild = Random(1,$pics[0],1)
;ConsoleWrite($pics[1])
;ConsoleWrite($bild)
$i = $bild
$pic = GUICtrlCreatePic ( @DesktopDir & "\o" & "\" & $pics[$i], 1, 1,$width,$height)
Sleep($time)
GUICtrlDelete($pic)
EndIf
$nMsg = GUIGetMsg()
Select
Case $nMsg = $GUI_EVENT_CLOSE
Exit
Case $nMsg = $stop
$po = 1
Case $nMsg = $start
$po = 0
Case $nMsg = $Slider1
$time = GUICtrlRead($Slider1)
EndSelect
WEnd
Könntet ihr mir eine Funktion zeigen mit der ich das machen kann .
Gruß L3w3x