world.OpenBrowser

MUSHclient script function (Method) — introduced in version 3.74

Opens a supplied URL in your default web browser

Prototype

long OpenBrowser(BSTR URL);

Data type meanings

Description

Opens the URL you supply using the default web browser for this PC.

The URL must start with one of the following strings (not case-sensitive):

http://
https://
mailto:

VBscript example

OpenBrowser "http://www.mushclient.com"

Jscript example

OpenBrowser ("http://www.mushclient.com")

PerlScript example

$world->OpenBrowser ("http://www.mushclient.com");

Lua example

OpenBrowser ("http://www.mushclient.com")

Return value

eBadParameter - the URL was either empty or did not start with "http://", "https://", or "mailto:".

eCouldNotOpenFile - an error code was returned by Windows when attempting to open the web browser

eOK - successfully opened

Return code meanings

Related topic

World functions

See also

FunctionDescription
OpenOpens a named document