Hi everyone, I'm a bit noob at this so please be patient
I'm creating a backup manager, I have implemented the backup creating in other executable. Now I'm creating the backup resorting. This is what I have:
#include <File.au3>
#include <Array.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Local $b=@AppDataDir & "\BACKUP\"
Local $search = FileFindFirstFile($b & "\*.*")
Local $n=0
If $search = -1 Then
MsgBox(16,"Backup Manager","No backup existing.")
Exit
EndIf
While 1
Local $file = FileFindNextFile($search)
If @error Then ExitLoop
$n+=1
if @error Then ExitLoop
WEnd
FileClose($search)
Local $arr[$n]
$arr = _FileListToArray ($b)
Local $height=0
$Form1 = GUICreate("Form1", 247, 272, 192, 124)
while $n<>0
$Radio = GUICtrlCreateRadio("$arr[$n]", 0, $height, 113, 17)
$height+=16
WEnd
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
I've been stuck creating the n variables for the Radios in the GUI. I've been searching a way to do something like:
while n<>0
$"Radio" & $n
$n-=1
wend
But obviously it doesn't work. I don't know if there is a way to do that way or if I've to do another way.
If you have to, ask some question, and sorry about my english.