Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Populate ListView from txt file

$
0
0
Hello,

I've done quite a bit of sifting through the forums, but have had no luck.  I'm trying to figure out how to populate a ListView from a txt file.  The ListView is only one column... The name of the file to pull from would be "computers.txt".  Below is where I am currently at:

[ autoit ]         
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GUIConstants.au3> #include <GUIListBox.au3> #include <GuiComboBox.au3> #include <GuiListView.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <file.au3> Main() Func Main() $Form1 = GUICreate("Computers", 331, 251, 192, 124) $Process = GUICtrlCreateCombo("", 200, 48, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $CompListView = GUICtrlCreateListView("Computers", 8, 48, 169, 162) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 165) GUISetState(@SW_SHOW) While 1     $nMsg = GUIGetMsg()     Switch $nMsg     Case $GUI_EVENT_CLOSE  Exit     EndSwitch WEnd EndFunc ; Main()

Viewing all articles
Browse latest Browse all 12506

Trending Articles