Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Populate a Listbox Using the Contents of a Text FileContent of Populate a Listbox Using the Contents of a Text File.vbsMD5 Hash: A9207455F53C469D79CE704DD8AF802A |
||
' Description: Sample HTML function that opens a text file and adds the contents to a listbox each time a Web page or HTA is loaded.
Sub Window_Onload ForReading = 1 strNewFile = "computers.txt" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile _ (strNewFile, ForReading) Do Until objFile.AtEndOfStream strLine = objFile.ReadLine Set objOption = Document.createElement("OPTION") objOption.Text = strLine objOption.Value = strLine AvailableComputers.Add(objOption) Loop objFile.Close End Sub | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |