0% found this document useful (0 votes)
9 views1 page

Save Text from Editor to File

The document describes a subroutine named SaveText that saves the contents of a text editor or text window to a specified file. It takes two arguments: the file name and the handle of the text window. The subroutine opens the file for output, retrieves the contents, and writes them to the file before closing it.

Uploaded by

olaadeleye184
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Save Text from Editor to File

The document describes a subroutine named SaveText that saves the contents of a text editor or text window to a specified file. It takes two arguments: the file name and the handle of the text window. The subroutine opens the file for output, retrieves the contents, and writes them to the file before closing it.

Uploaded by

olaadeleye184
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

NAME=SaveText

AUTHOR=
ITEM=sub SaveText fileName$, handle$
DESCRIPTION=Sub saves the contents of a texteditor / text window (handle$) to the
specified file (fileName$).
OUTSIDE CODE=

sub SaveText fileName$, handle$


'arguments:
'fileName$ - file to save to
'handle$ - handle of a text window or texteditor
'mode$ - not case-sensitive, either "output" or "append"
open fileName$ for output as #ffFileHandle
#handle$, "!contents? temp$"
print #ffFileHandle, temp$
close #ffFileHandle
end sub

You might also like