Another way : $callFunc = True $event = False _Main() Func _Main() While $callFunc _Sub() WEnd EndFunc ;==>_Main Func _Sub() Local $aWork = [[_Work1,1000],[_Work2,2000],[_Work6,500]] ;..... For $i = 0 to UBound($aWork) - 1 $aWork[$i][0]() If Not _iSleep($aWork[$i][1]) Then Return Next EndFunc ;==>_Sub Func _iSleep($sleepTime) Local $time