gerne in einer InputBox alle Ordner
Hier mal für ein Input (sinnvoll?).
Spoiler anzeigen
#include <File.au3>
#include <EditConstants.au3>
Global $sPath, $aFolder, $index
[/autoit] [autoit][/autoit] [autoit]$hGui = GUICreate('Ordner', 414, 70)
$inRoot = GUICtrlCreateInput('', 10, 10, 350, 20)
GUICtrlSendMsg($inRoot, 0x1501, 0, "Bitte Ordner auswählen")
$btSelect = GUICtrlCreateButton('...', 384, 10, 20, 20)
$inFolder = GUICtrlCreateInput('', 10, 40, 350, 20, $ES_READONLY)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$btPrev = GUICtrlCreateButton('<', 362, 40, 20, 20)
$btNext = GUICtrlCreateButton('>', 384, 40, 20, 20)
ControlFocus($hGui, '', $btSelect)
GUISetState()
[/autoit] [autoit][/autoit] [autoit]While 1
Switch GUIGetMsg()
Case -3
Exit
Case $btSelect
$sPath = FileSelectFolder('Bitte einen Ordner auswählen', '')
If Not @error Then _ReadFolders($sPath)
Case $btPrev
_ShowPrevious()
Case $btNext
_ShowNext()
EndSwitch
WEnd
Func _ReadFolders($path)
$aFolder = _FileListToArray($path, '*', 2)
GUICtrlSetData($inRoot, $path)
If Not IsArray($aFolder) Then
GUICtrlSetData($inFolder, 'Keine Unterordner!')
Return WinSetTitle($hGui, '', '[ 0 von 0 ]')
EndIf
$index = 1
GUICtrlSetData($inFolder, $aFolder[$index])
WinSetTitle($hGui, '', '[ 1 von ' & $aFolder[0] & ' ]')
EndFunc
Func _ShowPrevious()
If $index = 1 Then Return
$index -= 1
GUICtrlSetData($inFolder, $aFolder[$index])
WinSetTitle($hGui, '', '[ ' & $index & ' von ' & $aFolder[0] & ' ]')
EndFunc
Func _ShowNext()
If $index = $aFolder[0] Then Return
$index += 1
GUICtrlSetData($inFolder, $aFolder[$index])
WinSetTitle($hGui, '', '[ ' & $index & ' von ' & $aFolder[0] & ' ]')
EndFunc
Nun kannst du dich mal selbst an der Combo versuchen.