The ARC Script Manual.


FileExists( filename )
Returns a 1 or 0 if the specified file exists.
Example: $fileExists = FileExists(c:\temp\mylog.txt)

FileDelete( filename )
Deletes a file on your computer
Example: FileDelete(c:\temp\mylog.txt)

FileReadAll( filename )
Returns the entire contents of the specified file.
Example: $contents = FileReadAll(c:\temp\mylog.txt)

FileReadChar( filename )
Returns the next character in the specified file
Example: $char = FileReadChar(c:\temp\mylog.txt)

FileReadClose( filename )
Closes the file from reading.
This must call must be performed before writing to the file. Once you begin reading from the file, the file is OPEN. Closing the file will reset to the start once you begin reading again.
Example: FileReadClose(c:\temp\mylog.txt)

FileReadEnd( filename )
Returns a 1 or 0 if the file has reached the end.
Example: $fileEnd = FileReadEnd(c:\temp\mylog.txt)

FileReadLine( filename )
Returns the next line of the specified filename.
Example: $line = FileReadLine(c:\temp\mylog.txt)

FileReadLineRandom( filename )
Returns a random line within the specified file
Example: $randomLine = FileReadLineRandom(c:\temp\mylog.txt)

FileReadReset( filename )
Resets the file to the beginning.
If you read to the end of a file, this function must be called to reset reading from the beginning of the file.
Example: FileReadReset(c:\temp\mylog.txt)

FileWrite( filename, contents )
Appends text to the specified file. This does not append a new line.
Example: FileWrite(c:\temp\mylog.txt, My Variable: + $x)
Example: FileWrite(c:\temp\mylog.txt, servo Position: GetServo(d2))

FileWriteLine( filename, contents )
Appends text as a new line to the specified file.
Example: FileWriteLine(c:\temp\mylog.txt, My Variable: + $x)
Example: FileWriteLine(c:\temp\mylog.txt, servo Position: GetServo(d2))

FillArray( variable, default value)
Fill an existing array with the default value.
Example: FillArray($myArray, 88)
Example: FillArray($myArray, default value)

Forward( [speed], [milliSeconds] )
Using a Movement Panel Control, this will start your robot in the Forward direction.
Optionally, you can provide the speed and/or number of milliseconds to move.
You will require at least one Movement Panel to be configured within the project. This function will control that movement panel.
Speed is a number between 0 and 255
Example: Forward()
Example: Forward(200)
Example: Forward(255, 5000)


Upgrade to ARC Pro

Unleash your creativity with the power of easy robot programming using Synthiam ARC Pro