en fr

Sysquake Pro – Table of Contents

Sysquake – Table of Contents

Sysquake for LaTeX – Table of Contents

Extension - Launch URL

This section describes a function which requests the default WWW browser to open a URL.

The intended use of launchurl is the display of local or Web-based documentation. You can add menu entries to your SQ files to help your users, point to updates, or send e-mail.

Functions

launchurl

Launch a URL in the default browser.

Syntax

status = launchurl(url)

Description

launchurl asks the current browser to launch a URL given as a string. Exactly what "launching a URL" means depends on the URL protocol, i.e. the part before the colon, and on the program which processes it. If the URL cannot be processed, the status is set to false; otherwise, it is true, which does not mean that a connection has been correctly established on the World Wide Web.

The current implementation uses the method openURL: of the AppKit framework on the Macintosh and ShellExecute on Windows. On Windows, the URL must begin with http:, ftp:, gopher:, nntp:, news:, mailto:, or file:. On Linux, the first application in the following list which is found in the current path is executed: $X11BROWSER, $BROWSER (environment variables), htmlview, firefox, mozilla, netscape, opera, konqueror; launchurl always returns true.

Example

if ~launchurl('https://calerga.com')
  dialog('Cannot launch https://calerga.com');
end