beautypg.com

Filename = getopenfilename ( title, filter ), Filename = getsavefilename ( title, filter ), Status = move ( existingfilename, newfilename ) – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 45: Contents = read ( filename ), Status = removedirectory ( directoryname )

background image

N

AURTECH

W

EB

B

ROWSER AND

T

ERMINAL

E

MULATION FOR

W

INDOWS

CE

AND

W

INDOWS

M

OBILE




CETerm Scripting Guide

Page 45


reference for details on the Date() constructor arguments. See Appendix 4 for
attribute definitions.

filename = GetOpenFileName ( title, filter )

Return the name of a file specified by the user in an Open file dialog. The title of
the dialog should contain descriptive information for the user. For example,
“Please select a datafile.” The filter is a list of filter pairs. Each pair represents
the description of a filter and the file selector wildcards. For a JavaScript file it
may look like this:

"JScript File (*.js)\x00*.js\x00\x00"

. Each element of

the pair is followed by

"\x00"

as a separator character. The last pair has an

additional trailing

"\x00"

. Here is a multiple filter example:

"JScript File (*.js)\x00*.js\x00All Files(*.*)\x00*.*\x00\x00"

filename = GetSaveFileName ( title, filter )

Return the name of a file specified by the user in a Save file dialog. The title of
the dialog should contain descriptive information for the user. For example,
“Save file as:”. The filter is list of filter pairs. Each pair represents the description
of a filter and the file selector wildcards. For a JavaScript file it may look like this:

"JScript File (*.js)\x00*.js\x00\x00"

. Each element of the pair is followed

by

"\x00"

as a separator character. The last pair has an additional trailing

"\x00"

. Here is a multiple filter example:

"JScript File (*.js)\x00*.js\x00All Files(*.*)\x00*.*\x00\x00"

status = Move ( existingFilename, newFileName )

Move or rename an existing file. Returns true for success, false for failure.
Use the File properties LastError or LastErrorMessge to get additional error
information.

contents = Read ( fileName )

Read entire file and return as contents. The read is an atomic operation which
opens the file, reads all contents and closes the file. The File object does not
support the concept of an “open” file or reading parts of a file. There must be
sufficient memory to hold the entire file contents. There is no error information
returned. Use GetAttributes to validate a filename and ensure read access.

status = RemoveDirectory ( directoryName )

Delete an existing directory. Return true for success, false for failure.

This manual is related to the following products: