本帖最后由 haodd 于 2011-2-11 13:08 编辑
希望这个对你有用#NoTrayIcon
#Region ;**** 参数创建于 ACNWrapper_GUI ****
;~ # http://www.autoitx.com haodd
;~ #AutoIt3Wrapper_outfile=dir list.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
Dim $i = 0
DirCreate ( "D:\test" )
While $i < 10
DirCreate ( "D:\test" & $i)
$i += 1
WEnd
$file = FileOpen("D:\test\set.ini", 2)
; 检查打开的文件可写
If $file = -1 Then
MsgBox(0, "错误", "不能打开文件.")
Exit
EndIf
FileWriteLine($file, "[路径]")
FileWriteLine($file, "路径 = D:\test")
FileWriteLine($file, "[忽略目录]")
FileWriteLine($file, ";格式 :")
FileWriteLine($file, ";目录名 = 1")
FileWriteLine($file, "0=1")
FileWriteLine($file, "2=1")
FileWriteLine($file, "4=1")
FileWriteLine($file, "6=1")
FileWriteLine($file, "8=1")
FileClose($file)
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Include <File.au3>
Dim $Dir = IniRead("D:\test\set.ini","路径","路径","")
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Dir list", 139, 317, 763, 399)
$List1 = GUICtrlCreateList("", 8, 8, 123, 300)
_unList()
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func _unList()
$FileList=_FileListToArray($Dir,"*", 2)
For $i =1 To $FileList[0]
$unlist = IniRead("set.ini","忽略目录",$FileList[$i],"")
If $unlist Then ContinueLoop
GUICtrlSetData($List1, $FileList[$i])
Next
EndFunc
|