mobileFX JavaScriptX - Google V8 JavaScript Embedded Framework
JavaScriptXLib ActiveX DLL / ScriptControl Object / Run Method

Required. String name of the procedure to run.

Required. An array containing any parameters for the procedure being run.

In This Topic
    Run Method
    In This Topic
    Description

    Executes a JavaScript function.

    Syntax
    Visual Basic
    Public Function Run( _
       ByVal ProcedureName As String, _
       ByRef Parameters() As Variant _
    ) As Variant
    Parameters
    ProcedureName

    Required. String name of the procedure to run.

    Parameters

    Required. An array containing any parameters for the procedure being run.

    Return Type

    Variant containing the result of Run.

    Remarks
    You can also execute a single statement by using the ExecuteStatement method. This method works just like the Eval method and can access resources in the module it was declared, in public variables declared in any module, and in the global module.
    Example
    Private Sub Form_Load()
    
        Set SC = New ScriptControl
        SC.Language = "JavaScript"
        SC.AllowUI = True
        SC.SitehWnd = Me.hWnd
        SC.UseSafeSubset = False
        SC.Timeout = 60
    
        Dim Result As Variant
    
        Result = SC.Run("eval", "1+2")
    
    End Sub
    See Also