SetDefaultBrowserType Function


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


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


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.


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

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