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 DESCRIPTION This function is used to return string containing an expression formatted according to format parameter. PARAMETERS Key  Description  Expressi...
SYNTAX  Public Function RunScript(chartIndex As Integer, ScriptName As String) As Boolean DESCRIPTION This function is used to run a VTL client script on a specific chart by the script name. PARAMETERS Key  Description  chartIndex The ch...
SYNTAX Public Sub EndScript() Description This function is used to stop the running script pro-grammatically. Parameters No parameters. Return value No returns value. Sample Public Sub main() Dim isCodeStopped isCodeStopped = True If CBool(isC...
SYNTAX Public Function ServerGMT()As String DESCRIPTION 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() ...
SYNTAX Public Function UnixTime(time As Date)As String DESCRIPTION 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 i...
SYNTAX Public Function CurTime()As String DESCRIPTION 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 serv...
SYNTAX Public Function ClientStatus()As Boolean DESCRIPTION This function indicates if the client is connected or  disconnected. PARAMETERS No parameters. RETURN VALUE Returns boolean value. SAMPLE  Public Sub main ()  AlertMessage ClientStatus (...
SYNTAX Public Function UserName()As String DESCRIPTION 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) DESCRIPTION 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 ...
SYNTAX Public Sub EnableTimer(vVal As Boolean) DESCRIPTION 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 ...
SYNTAX Public Function ErrorDescription(errorNumber As Integer)As String DESCRIPTION This function is used to return a description of the error that occurs during the execution. PARAMETERS Key Description  errorNumber Error number that c...
SYNTAX Public Function GetLastError( )As Integer DESCRIPTION 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 ...
SYNTAX Public Sub LineColor(chart_ID As Long, name As Variant, value As long) DESCRIPTION This function used to set color to specific Line indicator by given the line name . PARAMETERS Key Description chart_index Chart identifier, 0 is t...
SYNTAX Public Sub LineStyle (chart_ID As Long, name As string, value As ENUM_LINE_STYLE) DESCRIPTION This sub used to set style for specific drawing indicator line. PARAMETERS Key Description chart_ID Chart identifier, 0 is the current c...
SYNTAX Public Sub LineWeight(chart_id As Long, name As string, value As Integer) DESCRIPTION This function used to set the weight for specific drawing indicator line. PARAMETERS Key Description chart_id Chart identifier, value of type Lo...
SYNTAX Public Function RGBColor(Red As Integer, Green As Integer, Blue As Integer) As Long DESCRIPTION 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 ...
SYNTAX Public Function StopSound(FileName As String) As Boolean DESCRIPTION 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 Retu...
SYNTAX Public Function PlaySound(FilePath As String) As Boolean DESCRIPTION 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. ...
SYNTAX Public Sub PlayBeep() DESCRIPTION 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 * Play...
SYNTAX Public Function IsEmptyExpression(expression As Variant) As Boolean DESCRIPTION This function is used to return a boolean value indicating whether a value has been initialized or not. PARAMETERS Key Description expression An expre...
SYNTAX Public Function IsArrayValue(varName As Variant) As Boolean DESCRIPTION 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 varian...
SYNTAX Public Function IsDateValue(expression As Variant) As Boolean DESCRIPTION This function is used to return a boolean value indicating whether an expression is a valid date value. PARAMETERS Key Description expression An expression ...
SYNTAX Public Function IsNullValue(expression As Variant) As Boolean DESCRIPTION This function is used to return a boolean value that indicates a specified expression containing non valid data. PARAMETERS Key Description expression An ex...
SYNTAX Public Function IsNumericValue(vVal As Variant) As Boolean DESCRIPTION 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...
SYNTAX Public Function JoinArray(sourceArry As Variant, Optional Delimeter As String) As String DESCRIPTION This function is used to return a string created by joining a number of substrings contained in any array. PARAMETERS Key Description ...
SYNTAX Public Function LeftString(varString As String, lengthVal As Integer) As String DESCRIPTION This function is used to return a string containing a specified number of characters from the left side of a string. PARAMETERS Key Description ...
SYNTAX Public Function RightString(varString As String, lengthVal As Integer) As String DESCRIPTION This function is used to return a string containing the specified number of characters from the right side of a string. PARAMETERS Key Descripti...
SYNTAX Public Function MidString(stringVar As String, start As Long, Optional lengthVar As Integer) As String DESCRIPTION This function is used to return a string containing a specified number of characters from a string. PARAMETERS Key Descrip...
Help Desk Software by Hybrid Solutions