Programming with Reflection

image\rwnprg32.gif SaveDisplayMemory method

 

Syntax object.SaveDisplayMemory Filename, [IfFileExists], [Options]

 

Description

Saves the contents of all or part of display memory to a file.

For example, the following example copies the contents of the current screen to an XML file called Test.xml:

Session.SaveDisplayMemory "C:\Mypath\Test.xml", rcOverwrite, rcAsXML + rcScreen

Arguments

Filename Argument Type: String
Required
Specifies the file to which display memory is to be written.

IfFileExists Argument Type: Enumeration
Optional
Specifies what to do if the file already exists. If this argument is omitted, the default is rcCancel. The possible values are:

 rcCancel

 Generates an error if the file exists.

 rcOverwrite

 Overwrites the existing file.

 rcAppend

 Appends to the existing file.

 

Options Argument Type: Enumeration
Optional
Specifies additional, non-default behavior for the method. (To combine the more than one option, use the addition operator (+), for example: rcScreen + rcAsXML.)

 rcNoTranslation

 Indicates that the contents of display memory should be saved as binary data, and should not be translated from the host character set into the PC character set.

 rcScreen

 Indicates that the contents of the current screen (rather than all of display memory) should be saved.

 rcSelection

 Indicates that just the currently selected text should be saved.

 rcAsXML

 Indicates that the contents of display memory should be saved in XML format.

Notes

· If the WriteSpacesAsTab property is True and the rcNoTranslation option is not specified, multiple space characters are converted to tabs as they are written to disk according to the current value of the SpacesPerTab property.

· If the WriteCtrlZAsEOF property is True and the rcNoTranslation option is not specified, a Ctrl-Z character is appended to the end of the file as it is written.

· If the DeleteTrailingSpaces property is True and the rcNoTranslation option is not specified, spaces at the end of lines are not written to the disk.

 

image\jump.gif Keyword Index

image\popup.gif Related Topics

image\popup.gif Reflection products that use this command