Proxy Auto Config (PAC) is a traditional method by which web browsers are automatically configured to use the appropriate proxy for any given site. PAC files consist of a single function implemented in JavaScript.
I would like to execute this function for another puropose: I am trying to create an application that selects proxies for use in the same way as Microsoft Internet Explorer does. Since I cannot just ask IE which proxy it will use for a particular site, I try to imitate what IE will do when it chooses which proxy to use for this web resource.
It's easy to call a JS function with the Windows Scripting host, but to run the PAC file, I need some standard functions like shExpMatch and isPlainHostName . They are usually provided by the browser. Firefox provides this file in a convenient JS file - unfortunately, the FF implementation does not seem to be fully compatible with Microsoft's Javascript implementation.
I need to find where the official microsoft versions of these functions are, so that I can include them in my scripting environment before trying to call the function.
Any ideas where they might be?
thanks
Update 0: I found a documented microsoft function that could do what I need - the question is, how can I call this from Win32Com in Python 2.4.4?