int tsmShowUrl ( const char *url )

Displays a web page using netscape

Documentation

Displays a web page using netscape.

This function will take a URL as input and then attempt to display it using the netscape browser. This assumes that the program "netscape" is somewhere in your $PATH (and also that /bin/sh exists).

The function is intelligent in that if there is already a netscape session currently running, then it will display the URL using that netscape, rather than trying to run another netscape from scratch. Also, this function will not block until you quit netscape - as soon as the page has been displayed, control is passed back to the client.

This function can be useful for embedding web documentation or links in your program, e.g. tsmShowUrl( "http://www.ai.sri.com/~magic/tsmApi" );

N.B. the URL string that you pass in must begin with "http:" or "file:" (lower case only). If not, then an error (FALSE) will be returned.

You can change the web browser to use by using the tsmSetWebBrowser function. If you are compiling this under Windows, or if the web browser is not specified as netscape, then this function will not attempt to do the fancy -remote stuff.

Returns:
TRUE if command was executed (it still might fail in the shell), FALSE if an error occurred trying to execute the command.
Parameters:
url - the http or file URL to be displayed
Author:
Martin Reddy
Version:
17 March 1998
See Also:
tsmSetWebBrowser


TSMAPI_RELEASE 2.1 - Release Date: 2001/01/10 19:01:12

Back to tsmApi Home Page