SaveDocument
Description:
Save a Document in the specified Location.
Format:
SaveDocument (integer Session ID (optional), string File Name, string Document Address (optional))
|
Parameters: |
Integer |
Session ID (optional) |
Browser Occurrence Number.
First Browser occurrence is 1
Default value is 1 |
|
String |
File Name |
Fully Qualified File Name of location to store |
|
String |
Document Address (optional) |
The Document Address (URL) to Save. |
|
Return Value: |
Boolean |
Success Ind |
Success Indicator.
TRUE – Link was clicked
FALSE – Link was not clicked |
Usage:
Use this function to save a Document. If Document Address (URL) is not provided the current document is saved. Otherwise the named Document Address (URL) will be saved, regardless of the currently displayed document. The file name must be a fully qualified file name including the file extension. If the File already exists and the SetFileOverWrite setting is FALSE, the save will fail. If the SetFileOverWrite setting is TRUE, the file will be overwritten with the new file.
Example 1:
Save the current Document, in the default Browser Occurrence, in file: C:\Data\Google.html.
SaveDocument ('C:\Data\Google.html')
Example 2:
Save the Document in the second Browser Occurrence in file C:\Data\Google.html. Overwrite the file if it already exists.
SetFileOverwrite (TRUE)
SaveDocument (2, 'C:\Data\Google.html')
Example 3:
Save a Document that is not the current document in file C:\Data\Google.html. Overwrite the file if it already exists. Note: It does not matter which occurrence of the Browser is used as long as the default or specified occurrence is open.
SetFileOverwrite (TRUE)
SaveDocument ('C:\Data\Google.html', 'www.google.com')