Home > Language Reference > Web Functions > CloseBrowser

CloseBrowser

The CloseBrowser function closes the browser current Tab.

Usage

CloseBrowser closes only the browser focused/current Tab. To close all the browser windows, use KillApp("IEXPLORE.EXE",1) or KillApp("firefox.exe",1) or KillApp("chrome.exe",1).

Syntax

ret=CloseBrowser()

Parameter

None.

Return value

Ret, optional numeric return code. When the browser Tab has been closed correctly, the return value is zero. The return code is -1 if no browser is in use.

See also

StartBrowser
KillApp

Examples

StartBrowser("IE","www.wintask.com/demos")
CloseBrowser()

StartBrowser("FF","www.wintask.com/demos")
CloseBrowser()

StartBrowser("CH","www.wintask.com/demos")
CloseBrowser()