-1
我想做一個窗體從文件中選擇某些樣本,並將其添加到另一個文件..無法弄清楚爲什麼它不會工作..我試過它和沒有數組,程序只是列出文件的位置而不是內容..還有人有這樣的東西的機會已經設置每個列表附加到文件?自動加載文件到
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>
#include <Date.au3>
#include <File.au3>
Global $aDate, $aTime
$text = ClipGet()
$sFileName = "\\SERVER\Server H\Staff Dropbox\blah\" & @MON & @MDAY & @YEAR & ".que"
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("Choices Dialog", 345, 252, -1, -1)
$ListBox1 = GUICtrlCreateList("", 8, 8, 137, 201)
GUICtrlSetData(-1, "Item1|Item2|Item3|Item4|Item5")
$Button1 = GUICtrlCreateButton(">", 156, 15, 30, 25)
$Button2 = GUICtrlCreateButton(">>", 156, 48, 31, 25)
$Button3 = GUICtrlCreateButton("<", 157, 81, 31, 25)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button4 = GUICtrlCreateButton("<<", 157, 114, 32, 25)
$ListBox2 = GUICtrlCreateList("", 200, 8, 137, 201)
$Button5 = GUICtrlCreateButton("&OK", 104, 225, 75, 25)
$Button6 = GUICtrlCreateButton("&Cancel", 184, 225, 75, 25)
$Clear = GUICtrlCreateButton("&Clear", 264, 225, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUICtrlSetData($ListBox1, "")
GUICtrlSetData($ListBox2, "")
$FileNameList = FileReadToArray($sFileName)
GUICtrlSetData($ListBox1, $sFileNameList)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button6
Exit
Case $Clear
GUICtrlSetData($ListBox1, "")
EndSwitch
WEnd
檢查sFilename是否正確計算。在調用FileReadToArray之前它有什麼價值? – yacc