Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: display
Is there a way to write the lines directly to the screen from within the winbatch file? Or write to the clipboard or a temporary file and then show on screen directly from the WinBatch program?
AskFileText("Matching Lines",target,@unsorted,@single)You can resize the outside dimensions of the AskFileText with the WinPlace function, but there is no way to increase the inside dimensions of the width of the file contents display box. You can change the font used in the box with the IntControl(28,,1,0,0,0) function.
;display the contents of a file testfile1=FileLocate("win.ini") old = FileOpen(testfile1, "READ") msg="" while @TRUE ; Loop till break do us end line=fileread(old) If Line == "*EOF*" Then Break msg=strcat(msg,line,@CRLF) endwhile FileClose(old) display(5,"Filetext" ,msg) ;Binary example (runs much faster) fs=FileSize("C:\WINDOWS\WIN.INI") binbuf = BinaryAlloc(fs+100) if binbuf == 0 Message("Error", "BinaryAlloc Failed") else BinaryRead(binbuf, "C:\WINDOWS\WIN.INI") maxlen=min(binaryEODget(binbuf),30000) text=Binarypeekstr(binbuf,0,maxlen) binbuf=BinaryFree(binbuf) endif display(5, "", text)
Article ID: W13231
Filename: Display - Write File Contents to Screen.txt
File Created: 1999:04:15:16:52:38
Last Updated: 1999:04:15:16:52:38