FILE_SAVE

FILE_SAVE N,F

SAVES THE CONTENT OF THE SYSTEM OBJECT NUMBER N INTO THE FILE F

  • Type: Command
  • Parameters: 2
  • Group: System Objects

ACTION

The command FILE_SAVE N,F saves the content of the system object designated by its number N into the file F.

The system object is of type : MEMO, MEMO_RICH, COMBO, LIST, PICTURE, DLIST, SCENE2D, IMAGE, SYNEDIT.

SYNTAX: FILE_SAVE N,F

  • N = system object number (integer or real). Must be greater than 0 and less than or equal to the allowed maximum number of system objects.
  • F = string expression, path of the file.

USE

  • The command FILE_SAVE is used to save the content (text) of a MEMO, MEMO_RICH, COMBO, LIST, DLIST, SYNEDIT into a text file.
  • The command FILE_SAVE is used to save the content of a PICTURE, SCENE2D, IMAGE into a file. In The case, the file will be in "BMP" format (Bitmap).

ERROR

  • If number N is not a correct expression.
  • If number N exceeds the allowed maximum number of system objects.
  • If number N is not greater than 0.
  • If the system object number N does not exist.
  • If the system object number N is not of the type : MEMO, MEMO_RICH, COMBO, LIST, PICTURE, DLIST, SCENE2D, IMAGE, SYNEDIT.
  • If F is not a correct expression.

EXAMPLE

rem EXAMPLE 1: saving the content of a LIST

rem save content of the system object number 1, which can be a MEMO, a COMBO, a LIST, a DLIST

file_save 1,"c:\list of names.txt"

rem ---------------------------------

rem EXAMPLE 2: saving a picture

rem create a PICTURE

picture 1

rem the PICTURE becomes the drawing target

2d_target_is 1

rem draw a circle

2d_circle 30,30,20

rem save this circle into a graphic File (BMP)

file_save 1,"c:\My Circle.bmp"

SEE ALSO

MEMO

COMBO

LIST

PICTURE

FILE_LOAD