All Tutorials / Steve G / The EZ-Builder Script Manual.

The EZ-Builder Script Manual.

C.)

ClearVariables( )
Clear all variables. Variables are not cleared between projects. You may wish to call this function in your initialization script - unless your project is using variables from another previous project.
Example: ClearVariables()

CheckForUpdate()
Checks the EZ-Robot server if there is a newer version of EZ-Builder available.
This requires an internet connection.
Example: $x = CheckForUpdate()

CloseControl( )
Used for mobile devices and the Interface Builder only, this command will close the current control, the same as pressing the BACK button on your device.
Example: CloseControl()

ComAvailable ( Port )
Returns the number of bytes/characters in the input buffer of the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: $size = ComAvailable(“com1”)

ComClearInput( Port )
Clear the input buffer. The port must be open before this command can be called.
Example: ComClearInput(“com1”)

ComClose( Port )
Close the specified serial communication port on the local PC.
Example: ComClose(“com1”)

ComOpen( Port, Baud Rate )
Open the specified serial communication port on the local PC. When opened, this will also begin buffering incoming data which can be read. The input buffer is 128KB.
Example: ComOpen(“com1”, 9600)

ComRead( Port, Bytes to Read )
Read specified number of characters from the input buffer of the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: $variable = ComRead(“com1”, 15)

ComReadAll( Port )
Read all available string data from the input buffer of the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: $variable = ComReadAll(“com1”)

ComReadBinary( Port, Bytes to Read, Array )
Read specified number of byes from the input buffer of the specified serial communication port on the local PC. The data will be stored in the specified array. The array will be created automatically and sized to the incoming data. The port must be open before this command can be called.
Example: ComReadBinary(“com1”, 10, $arrayVariable)

ComReadLine( Port )
Read all string data up to a newline from the input buffer of the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: $variable = ComReadLine(“com1”)

ComWrite( Port, String )
Write the string to the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: ComWrite(“com1”, “this is data”)
Example: ComWrite(“com1”, $variable)

ComWriteBinary( Port, Array )
Write the array of data to the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: ComWriteBinary(“com1”, $arrayVariable)

ComWriteLine( Port, String )
Write the string as a new line to the specified serial communication port on the local PC. The port must be open before this command can be called.
Example: ComWriteLine(“com1”, “This is a line”)
Example: ComWriteLine(“com1”, $variable)

Contains( string1, string2 )
Returns TRUE or FALSE if string2 is found within string1.
This search is case insensitive.
Example: $value = Contains(“Cat In The Hat”, “Cat”)

ControlCommand( windowName, ControlCommandParameter, [values] )
Sends a command to the window by its name. View all available ControlCommand() parameters for each control when editing a script by pressing the Cheat Sheet tab. The Cheat Sheet tab is located to the right of the script editor in EZ-Builder. Pressing Cheat Sheet tab will display a list of all available parameters for each control. Simply click on the parameter and it will insert into your code.
Some commands require an additional parameter. When editing EZ-Script, check the Cheat Sheet tab to view all available commands for the controls within your project.
This command has a shorthand alias which is “CC” (See examples below).
Example: ControlCommand( "ADC Graph", pauseOn )
Example: ControlCommand( "SoundBoard", Track_3 )
Example: ControlCommand( "Camera", CameraTweet, "This is an Image Description" )
Example: ControlCommand( "Script Manager", ScriptStart, "MyScript" )
Example: ControlCommand( "Speech Recognition", PauseMS, 3000)
Example: cc(“Auto Position”, AutoPositionAction, “Action Name”)
Example: cc(“Auto Position”, AutoPositionFrame, “Frame Name”)
Example: cc(“Auto Position”, AutoPositionFrame, “Frame Name”, 50, 3)
Example: cc(“Speech Recognition”, PauseMS, 2000)

Cos( value )
Returns the math COS() function
Example: [i]$x = Cos(27)



References

ControlCommand Values
You can receive values for controls using using the GetControlValue() command. The syntax for this command can be found above in this document. Each control will accept a different collection of commands, which are listed here.

All Controls
Pause

Casting Functions
These functions are to cast objects from one datatype to another
To Double: CDBL()
To Integer: CInt()
To Long: CLong()
To Unsigned Integer: CUint()
To Unsigned Long: CULong()
To DateTime: CDateTime()