BrightSign Object Reference Manual (FW 5.1) User Manual
Page 26

18
•
Wait(timeout As Integer, port As Object) As Object: Instructs the script to wait on an object that
has an ifMessagePort interface. This method will return the event object that was posted to the message port. If the
timeout is specified as zero,
Wait() will wait indefinitely; otherwise, Wait() will return Invalid after the specified
number of milliseconds if no messages have been received.
Example:
p = CreateObject("roMessagePort")
sw = CreateObject("roGpioControlPort")
sw.SetPort(p)
msg=wait(0, p)
print type(msg) ' should be roGpioButton
print msg.GetInt() ' button number
•
ReadAsciiFile(file_path As String) As String: Reads the specified text file and returns it as a string.
•
WriteAsciiFile(file_path As String, buffer As String) As Boolean: Creates a text file at the
specified file path. The text of the file is passed as the second parameter. This method cannot be used to edit files:
A preexisting text file will be overwritten if it has the same name and directory path as the one being created.
Note: The
object provides more flexibility if you need to create or edit files.
•
ListDir(path As String) As Object: Returns an roList object containing the contents of the specified
directory path. File names are converted to all lowercase.
•
MatchFiles(path As String, pattern_in As String) As Object: Takes a directory to look in (it can
be as simple as "." or "/") and a pattern to be matched and then returns an roList containing the results. Each listed
result contains only the part of the filename that is matched against the pattern, not the full path. The match is only
applied in the specified directory; you will get no results if the pattern contains a directory separator. The pattern is
a case insensitive wildmat expression. It may contain the following special characters:
o ? -- Matches any single character.
o * -- Matches zero or more arbitrary characters.