FILE_LOAD

FILE_LOAD N,F

FILLS THE SYSTEM OBJECT NUMBER N WITH THE CONTENT OF FILE F

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

ACTION

The command FILE_LOAD N,F fills the system object designated by its number N with the content of file F.

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

SYNTAX: FILE_LOAD 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 to be loaded to the system object.

USE

  • The command FILE_LOAD is used to fill a MEMO, MEMO_RICH, COMBO, LIST, PICTURE, SOUND, MOVIE, BUTTON_PICTURE, DLIST, SCENE2D, HVIEWER, IMAGE, SYNEDIT with a file.
  • In that case, it is not necessary to CLEAR the content of the system object before filling it with a file.
  • The command FILE_LOAD is used to give a "meaning" to a PICTURE, a SOUND, a MOVIE, an IMAGE.
  • In the case of a PICTURE, the loaded file is immediatly displayed.
  • In the case of a SOUND, or a MOVIE we must use then PLAY when the file is loaded.

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, SOUND, MOVIE, BUTTON_PICTURE, DLIST, SCENE2D, HVIEWER, IMAGE, SYNEDIT.
  • If F is not a correct expression.

EXAMPLE

rem EXAMPLE 1: filling a LIST

rem create a LIST

list 1

rem fill it with the content of a file

file_load 1,"list of names.txt"

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

rem EXAMPLE 2: displaying a PICTURE

rem create a PICTURE

picture 1

rem fill it with a graphic File

file_load 1,"My House.bmp"

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

rem EXAMPLE 3: filling a sound and playing it

rem create a SOUND

sound 1

rem load a sound file

file_load 1,"crack.wav"

rem play the sound

play 1

SEE ALSO

MEMO

MEMO_RICH

COMBO

LIST

PICTURE

SOUND

MOVIE

MEMO_RICH

BUTTON_PICTURE

DLIST

SCENE2D

HVIEWER

IMAGE

SYNEDIT

PLAY

FILE_SAVE