Knowledgebase : Technical Support > API > Client API's/VTL > VTL Client Scripts > Utility Functions
SYNTAX  Public Function VTLFormat(Expression As Variant, Format As Variant) As String This function is used to return string containing an expression formatted according to format parameter. PARAMETERS Key  Description  Expression Any...
SYNTAX  Public Function RunScript(chartIndex As Integer, ScriptName As String) As Boolean This function is used to run a VTL client script on a specific chart by the script name. PARAMETERS Key  Description  chartIndex The chart posit...
Syntax Public Sub EndScript() This function is used to stop the running script programmatically. Parameters No parameters. Return value No returns value. Sample Public Sub main() Dim isCodeStopped isCodeStopped = True If CBool(isCod...
Syntax Public Function ServerGMT()As String This function is used to get the GMT value of the server. PARAMETERS No parameters. RETURN VALUE Returns the GMT server as a string value. SAMPLE Public Sub main() AlertMessage ServerGMT() ' to...
Syntax Public Function UnixTime(time As Date)As String This function is used to track time as a running total of seconds elapsed from 00:00 January 1, 1970. PARAMETERS Key Description  Time Time to get the total seconds for it, value ...
Syntax Public Function CurTime()As String This function used to return the server time. PARAMETERS No Parmeters. Return value Returns the server time as a string value Sample Public Sub main() AlertMessage CurTime() ' to get the server t...
SYNTAX Public Function ClientStatus()As Boolean This function indicates if the client is connected or  disconnected. PARAMETERS No parameters. RETURN VALUE Returns boolean value. SAMPLE  Public Sub main ()  AlertMessage ClientStatus ()   En...
SYNTAX Public Function UserName()As String This function used to get login user name. PARAMETERS No parameters. RETURN VALUE Returns user name as value of type string  SAMPLE  Public Sub main ()  AlertMessage UserName ()   End sub -------...
SYNTAX Public Sub IntervalTimer(vVal As Long) This function used to set the time interval for the OnTimer() [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2565] function in milliseconds. PARAMETERS Key Descrip...
SYNTAX Public Sub EnableTimer(vVal As Boolean) This function used to enable or disable the OnTimer() [http://hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/2565] function. PARAMETERS Key Description  vVal Used to e...
SYNTAX Public Function ErrorDescription(errorNumber As Integer)As String This function is used to return a description of the error that occurrs during the execution. PARAMETERS Key Description  errorNumber Error number that can get i...
SYNTAX Public Function GetLastError( )As Integer This function used to get the error number that occurrs during the execution. Parameters No Parameters. Return value Returns the error number as a value of type integer. Note: You can get the erro...
SYNTAX Public Sub LineColor(chart_ID As Long, name As Variant, value As long) This function used to set color to specific Line indicator by given the line name . PARAMETERS Key Description chart_index Chart identifier, 0 is the current ch...
SYNTAX Public Sub LineStyle (chart_ID As Long, name As string, value As ENUM_LINE_STYLE [http://www.hybrid-solutions.com/support/index.php?/Knowledgebase/Article/View/1914]) This sub used to set style for specific drawing indicator line. PARAMETERS ...
SYNTAX Public Sub LineWeight(chart_id As Long, name As string, value As Integer) This function used to set the weight for specific drawing indicator line. PARAMETERS Key Description chart_id Chart identifier, value of type Long. n...
SYNTAX Public Function RGBColor(Red As Integer, Green As Integer, Blue As Integer) As Long   This function returns a value of type long representing an RGB color value from a set of red, green and blue color components. PARAMETERS Key Desc...
SYNTAX Public Function StopSound(FileName As String) As Boolean This function is used to stop the sound playing from a given source file. PARAMETERS Key Description FileName The sound file path to stop it. RETURN VALUE Return true ...
SYNTAX Public Function PlaySound(FilePath As String) As Boolean This function is used to play specific sound from a given source file. PARAMETERS Key Description FilePath The sound file path, the file must be WAV audio file. RETURN V...
SYNTAX Public Sub PlayBeep() This function is used to play beep sound when execute. PARAMETERS No parameters. RETURN VALUE No returned value. SAMPLE  Public Sub main ()  PlayBeeb  End sub ------------------------- SEE ALSO * PlaySou...
SYNTAX Public Function IsEmptyExpression(expression As Variant) As Boolean This function is used to return a boolean value indicating whether a value has been initialized or not. PARAMETERS Key Description expression An expression of ...
SYNTAX Public Function IsArrayValue(varName As Variant) As Boolean This function is used to return a boolean value indicating whether a value points to an array. PARAMETERS Key Description varName An expression of type variant to be i...
SYNTAX Public Function IsDateValue(expression As Variant) As Boolean This function is used to return a boolean value indicating whether an expression is a valid date value. PARAMETERS Key Description expression An expression of type v...
SYNTAX Public Function IsNullValue(expression As Variant) As Boolean This function is used to return a boolean value that indicates a specified expression containing non valid data. PARAMETERS Key Description expression An expression ...
SYNTAX Public Function IsNumericValue(vVal As Variant) As Boolean This function is used to return a boolean value indicating whether an expression can be evaluated as a number. PARAMETERS Key Description vVal An expression of type var...
SYNTAX Public Function JoinArray(sourceArry As Variant, Optional Delimeter As String) As String This function is used to return a string created by joining a number of substrings contained in any array. PARAMETERS Key Description sourceA...
SYNTAX Public Function LeftString(varString As String, lengthVal As Integer) As String This function is used to return a string containing a specified number of characters from the left side of a string. PARAMETERS Key Description varStr...
SYNTAX Public Function RightString(varString As String, lengthVal As Integer) As String This function is used to return a string containing the specified number of characters from the right side of a string. PARAMETERS Key Description va...
SYNTAX Public Function MidString(stringVar As String, start As Long, Optional lengthVar As Integer) As String This function is used to return a string containing a specified number of characters from a string. PARAMETERS Key Description ...
Help Desk Software by Hybrid Solutions