BrowserSetProxy

Action

Sets the proxy host name and port for a specific protocol.
注: This function only works with Internet Explorer.

Include file

BrowserAPI

Syntax

BrowserSetProxy( in nProxyType : number,
                 in sHost      : string,
                 in nPort      : number ): boolean;
Parameter Description
nProxyType Proxy type. Can be one of the following types:
  • BROWSER_PROXY_HTTP
  • BROWSER_PROXY_FTP
  • BROWSER_PROXY_HTTPS
  • BROWSER_PROXY_SOCKS
sHost Host name of the proxy server. Specify an empty string ("") to establish a direct connection for the specific protocol.
nPort Port that the proxy server listens to.

Return value

  • true if successful

  • false otherwise

Example

transaction TMain
begin
  BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
  BrowserSetProxy(BROWSER_PROXY_HTTP, "proxy.mydomain.com", 8080);  
  BrowserNavigate("www.mycompany.com");
end TMain;