amin84 Posted October 24, 2011 Posted October 24, 2011 Hello, I started writing a VERY SIMPLE browser that will browse a webpage using a proxy list. I wrote it using _IECreateEmbedded() but now I don't know how to make this, browse with a proxy list assuming the proxy list is online. Does anyone has a sample code or can point me to the right direction? #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <WindowsConstants.au3> #include <IE.au3> SplashTextOn('Initializing...', 'Initializing. Please wait...', 300, 60, -1, -1, 16+32, "", 13) _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $Form2 = GUICreate("Form2", 922, 594, -1, -1) $GUIActiveX = GUICtrlCreateObj($oIE, 8, 8, 905, 577) _IENavigate ($oIE, 'google.ca') GUISetState(@SW_SHOW) SplashOff() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
DesireDenied Posted October 24, 2011 Posted October 24, 2011 (edited) I have found that you can setup your proxy on WinXP by changing registry. Have not tested but this should work. Func _SetupProxy($sProxyAddress) Local $HKEY_Proxy = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" If Ping($sProxyAddress) Then RegWrite($HKEY_Proxy, "ProxyEnable", "REG_DWORD", 1) RegWrite($HKEY_Proxy, "ProxyServer", "REG_SZ", $sProxyAddress) Return 1 Else RegWrite($HKEY_Proxy, "ProxyEnable", "REG_DWORD", 0) Return 0 EndIf EndFunc edit: added return values Edited October 24, 2011 by DesireDenied
amin84 Posted October 25, 2011 Author Posted October 25, 2011 Hello, Tnx for your code. It seems that every time I change proxy, I have to unload and create IE object again which makes the program VERY slow. I think the only way is to use some sort of socks proxy then getting the page using inetget() or something like that. I'll update this if I get anything new.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now