#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
Global $iGUI_Width = 225, $iGUI_Height = 130
Global $iStep = 1, $iEdge = 10
Global $iLeft1 = $iGUI_Width - $iEdge, $iLeft2 = $iGUI_Width + $iEdge
Global $sText = "нужен пример кода на AutoIt чтобы понять что такое рекурсия, иначе не понять для чего"
$hGUI = GUICreate("Пример рекурсий", $iGUI_Width, $iGUI_Height)
GUICtrlCreateLabel("Рекурсия", 0, 0, $iGUI_Width, $iGUI_Height - 40, BitOR($SS_CENTERIMAGE, $SS_CENTER))
GUICtrlSetFont(-1, 14, 800)
GUICtrlCreateLabel("", 2, $iGUI_Height - 30, $iGUI_Width - 4, 2, $SS_SUNKEN)
$nLabel1 = GUICtrlCreateLabel($sText, $iLeft1, $iGUI_Height - 20)
$nLabel2 = GUICtrlCreateLabel($sText, $iLeft2, $iGUI_Height - 20)
GUICtrlSetColor($nLabel1, 0x0000FF)
GUICtrlSetColor($nLabel2, 0x0000FF)
GUISetState(@SW_SHOW, $hGUI)
AdlibRegister("_MoveLabels", 10)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _MoveLabels()
$iLeft1 -= $iStep
If $iLeft1 <= -$iGUI_Width Then
$iLeft2 -= $iStep
ControlMove($hGUI, "", $nLabel2, $iLeft2, $iGUI_Height - 20)
EndIf
If $iLeft2 <= -$iGUI_Width Then
ControlMove($hGUI, "", $nLabel1, $iLeft2, $iGUI_Height - 20)
$iLeft1 = $iLeft2
$iLeft2 = $iGUI_Width + $iEdge
EndIf
ControlMove($hGUI, "", $nLabel1, $iLeft1, $iGUI_Height - 20)
EndFunc