CTextView:SaveAs


The SaveAs method saves the contents of the CTextView window to a new file or path as specified in a File Save dialog. After saving, the new file name is displayed in the window title. To save to the same file name and path, use Save.

Syntax

bResult = CTextView:SaveAs()

bResult = CTextView:SaveAs( strNewFileName )

bullet.gif    where strNewFileName is the default name to show in the File Save dialog. If omitted, the dialog opens with no name.

bullet.gif    On success, this method returns bResult = true.

bullet.gif    On failure, this method returns false.

Example

Suppose a CTextView T exists. The following script saves its contents to a new path and file name:

bSuccess = T:SaveAs()

-- opens a File Save dialog and saves the text

if not bSuccess then

-- if not saved, then...

  Printf("Window text can't be saved\n" )

-- error message

end

 

Related Topics

CTextView, Save


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.