WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to use ItemList Box to Display a Text File or Contents of a Text File

Keywords: 	  itembox askfiletext file text

Question:

How might I go about using ItemList Box to display a text file?

Answer:

  1. If all you want to do is display the file, use AskFileText.

  2. Otherwise...
       fname="c:\temp\example.txt" ; your file
       fsize=FileSize(fname)
       bb=BinaryAlloc(fsize)
       BinaryRead(bb,fname)
       filetext=BinaryPeekStr(bb,0,fsize)
       BinaryFree(bb)
    
    Now use the filetext variable in your Dialog ItemBox.

Article ID:   W12839
Filename:   Displaying Contents of a File in ItemBox.txt
File Created: 2001:12:06:12:21:44
Last Updated: 2001:12:06:12:21:44