BBInvoker Utility

Description

In BBj 9.0 and higher, the BBInvoker Utility runs commands such as third party applications and can launch the default Web browser with a given URL.

Creation

The BBInvoker class installs in <bbj install>/utils/invoker/bbinvoker.bbj with the download and installation of the Utilities option within BBj. BBInvoker is a pure static BBj CustomObject, therefore it does not need to be created first before using.

Parameters

None.

Methods of Invoker

Return Value

Method

int

run(string commandOrURL)

int

runBrowser(string url)

int

runCommand(string command)

int

runCommand(string command, string workingDir, boolean runOnServer, boolean runAsync)

boolean

isURL(string command)

Constants

None.

Example

rem 'Demo on how to use the BBInvoker

use ::bbinvoker.bbj::BBInvoker

declare BBjNumber returnCode
declare BBjString url$
declare BBjString command$

url$ = "https://www.basis.cloud"
returnCode = BBInvoker.runBrowser(url$)

command$ = "notepad.exe"
returnCode = BBInvoker.runCommand(command$)

See Also

BBj Object Syntax Code Completion