请帮助我如何创建一个列表,可能来自一个arrayList。输入框是文件夹的来源,它的所有png文件都会在数组列表中,并显示在GU中。谢谢
#include <GuiConstantsEx.au3>
#include <File.au3>
#include <Array.au3>
;GUI
GUICreate("Automation", 300, 500)
$sourceFolder = GUICtrlCreateInput ("Source Folder" , 10, 10,280, 20 )
$add = GUICtrlCreateButton("Add", 10, 35, 75, 20)
$mylist = GUICtrlCreateList("", 10, 60, 280, 300)
$sourceFolder = ControlGetText("Automation", "", "Edit1")
Local $FileList = _FileListToArray($sourceFolder, "*.png")
$msg = 0
While $msg
$msg = GUIGetMsg()
Select
Case $msg = $add
GUICtrlSetData($mylist,$FileList)
Exit
EndSelect
WEnd
If $sourceFolder > 1 Then
If @error = 1 Then
MsgBox(0, "", "No Folders Found.")
Exit
EndIf
If @error = 4 Then
MsgBox(0, "", "No Files Found.")
Exit
EndIf
$arrayFileList = _ArrayDisplay($FileList)
EndIf
; GUI MESSAGE LOOP
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd