RunSync Method



 The RunSync method runs a configured external application and returns the exit code when it has been closed.


Syntax

    [long] = SiteKiosk.ExternalApps.RunSync(path, timeout)
Parameters
    path String that specifies the path to the application.
    timeout Long value that specifies the timeout period.
Return Value
    Returns a Long value containing the exit code.
Remarks
    Setting the timeout parameter to -1 means that there is an infinite period of time.

    If a time out occurres an exception will be thrown.

    External applications can be configured in the SiteKiosk configuration. Use slash instead of backslash in the path string.
Examples
    The following example runs an external application and shows an alert window if a time out occurres.

    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    try
    {
       myexitcode = SiteKiosk.ExternalApps.RunSync("c:/myapp.exe", 20);
    }
    catch(e)
    {
       alert("Time out");
    }
    </SCRIPT>
    

Applies to
    SiteKiosk v5.5 (and later versions).

Back to top