SetDefaultBrowserType Function

Action

Sets the default browser type, which is used when new Agent connections are made.

Syntax

OldBrowserType = SetDefaultBrowserType (NewBrowserType)
Variable Description
OldBrowserType The previous browser type. BROWSERTYPE.
NewBrowserType The new browser type. BROWSERTYPE or NULL.

Notes

The default browser type is the one that is used when a new Agent connection is made.

SetDefaultBrowserType sets the default browser type to NewBrowserType or NULL (no browser) and returns the previous default browser type. SetDefaultBrowserType does not change the value set for the Default Browser field in the Runtime Options dialog box.

Example

Assume Internet Explorer 7.0 is the default browser when the following code is run.

BROWSERTYPE btOldType
btOldType = SetDefaultBrowserType (firefox1_5)
Print ("Old default: {btOldType}")
Print ("New default: {GetDefaultBrowserType()}")

// Result:
// Old default: Internet Explorer 7.0
// New default: Mozilla Firefox 1.5