PrintToFile

Print the entire host screen, or a selected area of text from the screen to a file.


Syntax

FlexScreen.PrintToFile(FileName, [StartPos, EndPos])


Parameters


FileName

String, input



Full path and name of file to print to.


StartPos

Integer, input, optional



Integer value of the zero based screen position to start the print, which may be obtained by using the FlexScreen.Position method.


EndPos

Integer, input, optional



Integer value of the zero based screen position to end the print, which may be obtained by using the FlexScreen.Position method.


Examples

To print the entire screen to a file:

Sub Main()

Ok = FlexScreen.PrintToFile("C:\Users\Public\MyFile.txt")

End Sub


To print from row 1, column 4 to row 14, column 27 to a file:

Sub Main()

Ok = FlexScreen.PrintToFile("C:\Users\Public\MyFile.txt", FlexScreen.Position(1, 4), FlexScreen.Position(14, 27))

End Sub