![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212099.webp)
CHAPTER 6 – Functions and Methods
OMRON
Page 86
Revision 2.0
Remarks
Argument Type
Description
Returnstate
bool
Returnstate
is ‘1’ if the function is successful, or ‘0’ otherwise.
Filename
string
Pathname of file to be read.
Offset
integer
An offset from the beginning of the file (in characters )
indicating where to start reading from.
Textpoint
text
point
The text point which holds the characters read from the file.
Noofchars
integer
The number of characters to read from the file.
Typical Example
ReadMessage (“C:\CX-SUPERVISOR\TESTFILE.TXT”, 0, TextPoint, 20)
The first 20 characters are be read from the file “C:\CX-SUPERVISOR\TESTFILE.TXT” and stored
in the point ‘TextPoint’.
Note:
Text points can hold up to 256 characters therefore a maximum of 256 characters can
be read from the file.
SelectFile
Syntax
filename = SelectFile (filter, path)
Remarks
Argument Type
Description
Filename
- - -
Text string returned. Contains fully qualified filename
including drive and path if OK was selected from OpenFile
comms dialog, otherwise contains empty string.
Filter
string
Optional argument. If omitted, will show all files. This
argument must be supplied if
path
is specified i.e. set to “”.
Specifies the filter string used by the ‘Files of type’ list. The
string should contain 1 or more filters separated with a ‘|’ (pipe)
character and end with 2 characters i.e. ‘||’. Each filter should
have some user text and 1 or more file specs separated with a
semicolon. No spaces should be used, except within the user
text.
Path
string
Optional argument. Specifies the path to show initially. If
omitted, the dialog shows the current working directory.
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...