#include <Timers.au3>
Global $Time = 2
$GUI = GUICreate("Test", 300, 200)
$Pic = GUICtrlCreatePic("1.jpg", 10, 10, 280, 180)
$Timer = _Timer_Init()
GUISetState()
Do
If _Timer_Diff($Timer)/1000 > $Time Then
GUICtrlDelete($Pic)
GUICtrlCreatePic(Random(1, 2, 1) & ".jpg", 10, 10, 280, 180)
_Timer_KillAllTimers($GUI)
$Timer = _Timer_Init()
EndIf
Until GUIGetMsg() = -3