SKANQuote:
I am not sure of your requirement.. Can you post a small sample of your .txt file ?
OhO, it's a file like Commands.txt or Variables.txt,::>
Code:
ExitApp [, ExitCode]
FileAppend [, Text, Filename]
FileCopy, Source, Dest [, Flag (1 = overwrite)]
FileCopyDir, Source, Dest [, Flag]
FileCreateDir, Path
FileCreateShortcut, Target, C:\My Shortcut.lnk [, WorkingDir, Args, Description, IconFile, ShortcutKey, IconNumber, RunState]
FileDelete, FilePattern
FileGetAttrib, OutputVar(RASHNDOCT) [, Filename]
FileGetShortcut, LinkFile [, OutTarget, OutDir, OutArgs, OutDescription, OutIcon, OutIconNum, OutRunState]
FileGetSize, OutputVar [, Filename, Units]
FileGetTime, OutputVar [, Filename, WhichTime (M, C, or A -- default is M)]
FileGetVersion, OutputVar [, Filename]
FileInstall, Source, Dest [, Flag (1 = overwrite)]
FileMove, Source, Dest [, Flag (1 = overwrite)]
FileMoveDir, Source, Dest [, Flag (2 = overwrite)]
FileRead, OutputVar, Filename
FileReadLine, OutputVar, Filename, LineNum
FileRecycle, FilePattern
FileRecycleEmpty [, C:\]
FileRemoveDir, Path [, Recurse? (1 = yes)]
FileSelectFile, OutputVar [, Options, RootDir[\DefaultFilename], Prompt, Filter]
FileSelectFolder, OutputVar [, *StartingFolder, Options, Prompt]
FileSetAttrib, Attributes(+-^RASHNOT) [, FilePattern, OperateOnFolders?, Recurse?]
FileSetTime [, YYYYMMDDHH24MISS, FilePattern, WhichTime (M|C|A), OperateOnFolders?, Recurse?]
FormatTime, OutputVar [, YYYYMMDDHH24MISS, Format]
GetKeyState, OutputVar, WhichKey [, Mode (P|T)]
Gosub, Label
Goto, Label
GroupActivate, GroupName [, R]
GroupAdd, GroupName, WinTitle [, WinText, Label, ExcludeTitle, ExcludeText]
GroupClose, GroupName [, A|R]
GroupDeactivate, GroupName [, R]
Gui, sub-command [, Param2, Param3, Param4]
GuiControl, Sub-command, ControlID [, Param3]
GuiControlGet, OutputVar [, Sub-command, ControlID, Param4]
Hotkey, KeyName [, Label, Options]
If (var = "Value") | IfWinExist, WinTitle | etc.`n{`n command1`n command2`n}`nElse`n{`n command1`n command2`n}
If Var [not] between Low and High
If Var [not] contains value1,value2,...
If Var [not] in value1,value2,...
If Var is [not] integer|float|number|digit|xdigit|alpha|upper|lower|alnum|space|time
IfEqual, var, value
IfExist, File|Dir|Pattern
IfGreater, var, value
IfGreaterOrEqual, var, value
IfInString, Var, SearchString
IfLess, var, value
IfLessOrEqual, var, value
IfMsgBox, Yes|No|OK|Cancel|Abort|Ignore|Retry|Timeout
IfNotEqual, var, value
IfNotExist, File|Dir|Pattern
IfNotInString, Var, SearchString
IfWinActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotActive [, WinTitle, WinText, ExcludeTitle, ExcludeText]
IfWinNotExist [, WinTitle, WinText, ExcludeTitle, ExcludeText]
ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
IniDelete, Filename, Section [, Key]
IniRead, OutputVar, Filename, Section, Key [, Default]
IniWrite, Value, Filename, Section, Key
Input [, OutputVar, Options, EndKeys, MatchList]
InputBox, OutputVar [, Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default]
KeyHistory
KeyWait, KeyName [, Options]
ListHotkeys
ListLines
ListVars
Loop [, Count]`n{`n ID := A_Index`n If var%A_Index% =`n break`n}
Loop, FilePattern [, IncludeFolders?, Recurse?]`n{`n FileName := A_LoopFileName`n FileFullPath := A_LoopFileLongPath`n FileRelativeDir := A_LoopFileDir`n command2`n}
Loop, Parse, InputVar [, Delimiters|CSV, OmitChars]`n{`n Line := A_LoopField`n command2`n}
Loop, Read, InputFile [, OutputFile]`n{`n Line := A_LoopReadLine`n command2`n}
Loop, HKLM|HKU|HKCU|HKCR|HKCC [, Key, IncludeSubkeys?, Recurse?]`n{`n RegName := A_LoopRegName`n RegType := A_LoopRegType`n command2`n}
Menu, MenuName, Cmd [, P3, P4, P5]
MouseClick, WhichButton [, X, Y, ClickCount, Speed, D|U, R]
MouseClickDrag, WhichButton, X1, Y1, X2, Y2 [, Speed, R]
MouseGetPos [, OutputVarX, OutputVarY, OutputVarWin, OutputVarControl, 1|2|3]
MouseMove, X, Y [, Speed, R]
MsgBox [, Options, Title, Text, Timeout]
OnExit [, Label]
OutputDebug, Text
Pause [, On|Off|Toggle, OperateOnUnderlyingThread?]
PixelGetColor, OutputVar, X, Y [, Alt|Slow|RGB]
PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID [, Variation, Fast|RGB]
PostMessage, Msg [, wParam, lParam, Control, WinTitle, WinText, ExcludeTitle, ExcludeText]
Process, Cmd, PID-or-Name [, Param3]
Progress, Param1 [, SubText, MainText, WinTitle, FontName]
Random, OutputVar [, Min, Max]
RegDelete, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName]
RegRead, OutputVar, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName]
RegWrite, REG_SZ|REG_EXPAND_SZ|REG_MULTI_SZ|REG_DWORD|REG_BINARY, HKLM|HKU|HKCU|HKCR|HKCC, SubKey [, ValueName, Value]
Reload
Repeat
Return [, Expression]
Run, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
RunAs [, User, Password, Domain]
RunWait, Target [, WorkingDir, Max|Min|Hide|UseErrorLevel, OutputVarPID]
Send, Keys
SendEvent, Keys
SendInput, Keys
A solution/exemple with ListView: (but in ListView, not retrieve in the combobox)
Code:
Gui, Add, ComboBox, vtFolder gAFFi
Gui Add, ListView, xm vMyListView , Cmd|N°L
gui, show
return
AFFi:
FileRead, FileList , commands.txt
guicontrolget, tFolder
LV_Delete()
loop , Parse, FileList, `n
{
LR = %A_LoopReadLine%
IfInString, LR, %tFolder%
{
LV_Add("",A_Index, LR )
}
}
return