Functions |
|
|
|
|
Function Name |
Parameters |
Return Data Type |
Description |
Example Syntax |
scale |
(Number Input,Number InputMin,Number InputMax,Number OutputMin,Number OutputMax,Boolean ClipToOutputRange(optional)) |
Number |
Scales the value Input according to the ratio between InputMin – InputMax and OutputMin – OutputMax. Restricts the output to the stated output range if ClipToOutputRange is True |
scale(100, 10, 200, 100, 500, True) |
mediaIndex |
(Number Bank,Number Clip) |
Number |
Converts a Bank and Clip to a media index |
mediaIndex(10, 50) |
mediaClip |
(Number MediaIndex) |
Number |
Returns the Clip portion of a media index |
mediaClip(500) |
mediaBank |
(Number MediaIndex) |
Number |
Returns the Bank portion of a media index |
mediaBank(500) |
time |
(Number Hours,Number Minutes,Number Seconds,Number Milliseconds(optional)) |
Number |
Returns Hours, Minutes, Seconds, and Milliseconds as total milliseconds |
time(0, 58, 20, 0) |
timecode24 |
(Number Hours,Number Minutes,Number Seconds,Number Frames) |
Number |
Returns a value that represents the entered timecode as total milliseconds based on a timecode format of 23.98 fps |
timecode24(1, 30, 20, 5) |
timecode25 |
(Number Hours,Number Minutes,Number Seconds,Number Frames) |
Number |
Returns a value that represents the entered timecode as total milliseconds based on a timecode format of 25 fps |
timecode25(1, 30, 20, 5) |
timecode30NonDrop |
(Number Hours,Number Minutes,Number Seconds,Number Frames) |
Number |
Returns a value that represents the entered timecode as total milliseconds based on a timecode format of 30.00 fps Non Drop |
timecode30NonDrop(1, 30, 20, 5) |
timecode30Drop |
(Number Hours,Number Minutes,Number Seconds,Number Frames) |
Number |
Returns a value that represents the entered timecode as total milliseconds based on a timecode format of 29.97 fps Drop Frame |
timecode30Drop(1, 30, 20, 5) |
sleep |
(Number Milliseconds) |
Nothing |
Forces the script execution to pause for X Milliseconds |
sleep(1000) |
regexMatch |
(String Input,String Pattern) |
Boolean |
Returns True if the string Input matches the regex Pattern, false if it does not match |
regexMatch('Me', 'Me') |
regexReplace |
(String Input,String Replacement,String Pattern) |
String |
Returns a new String where the string Input is modified with string Replacement according to the regex string Pattern |
regexReplace('Hello World Its Me', 'You', 'Me') |
ping |
(String IP,Number TimeOut) |
Boolean |
Returns true if a response is received to a network ping to address Ip before the timeout of X Milliseconds |
ping('8.8.8.8', 20) |
udpSend |
(String Data,String IP,Number Port,String LocalIP(optional)) |
Boolean |
Attempts to send the String Data using UDP to target IP on port X using the local network adapter with IP Address X. Returns true if data was sent to target, false if there was an error |
udpSend('DataString', '192.168.20.20', 3005, '192.168.20.22' |
tcpSend |
(String Data,String IP,Number Port,String LocalIP(optional),Number TimeOut(optional)) |
|
Attempts to send the String Data using TCP to target IP on port X using the local network adapter with IP X. Returns true if data was sent to target within TimeOut> Milliseconds, false if there was an error or it took too long |
tcpSend('StringData', '192.168.20.20', 3005, '192.168.20.22, 100) |
httpGet |
(String Address) |
String(success), Nul(failure) |
Performs an Http Get request to address and returns the message received back as a string |
httpGet('http://192.168.20.20') |
httpGetEx |
(String Address, Table Header) |
String(success), Nul(failure) |
Performs an Http Get request to an address with a table of header keys and values as authentication. Returns the message recieved back as a string |
header = {}
header["X-SIGNAGEPLAYER-WBI-APP-ID"] = "testID"
header["X-SIGNAGEPLAYER-WBI-APP-KEY"] = "testKey"
httpGet('http://192.168.100.100', header) |
httpPost |
(String Address,String Data, String Media Type(optional)) |
String(success), Nul(failure) |
Performs an Http Post request to address including data and media type. Returns the message received back as a string |
httpPost('http:\\192.168.100.100', 'dataString', 'application/json') |
httpPostEx |
(String Address, String Data, String Media Type, Table Header) |
String(success), Nul(failure) |
Performs an Http Post request to an address, passing string data and a string media type, using a table of header keys and values as authentication. Returns the message recieved back as a string |
header = {}
header["X-SIGNAGEPLAYER-WBI-APP-ID"] = "testID"
header["X-SIGNAGEPLAYER-WBI-APP-KEY"] = "testKey"
httpPostEx('http://192.168.100.100', 'dataString', 'application/json', header) |
Post your comment on this topic.