browser

Prev Next

Function Names

browser

Library

Support Library

Description

This function selects a standard web browser to be used for opening contents using a web browser or accessing Internet contents. The chosen web browser will be memorized for later use, so it only needs to be done when changing over to another browser.

Presently, B4P is supporting the following browsers:

Full browser name Short Name Windows LINUX MacOS Remarks
Apple Safari safari Yes
Brave brave Yes Yes
Google Chrome chrome Yes Yes Yes
Microsoft Edge edge Yes
Microsoft Explorer explorer Yes Obsolete
Mozilla Firevox firevox Yes Yes

Call as: procedure or function

Restrictions

Selection of supported browsers deviate across operating systems.

Parameter count

-

Parameters

No.TypeDescription
1
input
string browser name or option

get Returns the short browser name. If no browser name is defined, then a menu appears to choose a valid browser name.
(blank) Treated the same as 'get'
info Provides info about the chosen browser on the screen and returns the short browser name or blank if no browser is defined.
reset Removes the known browser name (corresponds to factory settings)
set A menu appears to choose the browser
short broswer name The browser name will be checked for validty. If OK, then it will be used. Otherwise, a menu appears to choose a valid browser name.

Default value: get

Return value

TypeDescription
string Short browser name

The short name of the selected browser will be returned.

Examples

  echo(new line, "Reset browser ..." );
  browser(reset);

  echo(new line, "Choose Google Chrome ..." );
  browser(chrome);

  echo(new line, "Get browser short name ..." );
  echo("Browser name = ", browser(get) );

  echo(new line, "Display info about chosen browser ..." );
  browser(info);

See also

openweb