Helper Functions
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 Performs an Http Get request to address and returns the message received back as a string httpGet('http://192.168.20.20'
httpPost (String Address,String Data String Performs an Http Post request to address including the added data and returns the message received back as a string httpPost('http:\\192.168.20.20', 'DataString')

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Please do not use this for support questions.
Green Hippo Forum

Post Comment