cypher175 Posted September 30, 2009 Share Posted September 30, 2009 Is there anyway to have an autoit script change IE's Proxy settings while IE is in use, and then have IE start using that proxy without first having to restart IE.?? Link to comment Share on other sites More sharing options...
Juvigy Posted October 1, 2009 Share Posted October 1, 2009 Yes. Create a script that: 1 clicks on tools menu 2 clicks on internet options 3 Go to connections tab 4 clicks on LAN settings 5 Adjust the proxysettings you want 6 Appl and close all 7 refresh IE That way you dont have to close the IE. Link to comment Share on other sites More sharing options...
cypher175 Posted October 2, 2009 Author Share Posted October 2, 2009 so thats the only way then..?? you cant just change a few reg keys and refresh IE, you have to make a script to press buttons and stuff..?? Link to comment Share on other sites More sharing options...
wolf9228 Posted October 2, 2009 Share Posted October 2, 2009 Is there anyway to have an autoit script change IE's Proxy settings while IE is in use, and then have IE start using that proxy without first having to restart IE.?? Func Set_Proxy($Address , $Port) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer" _ , "REG_SZ", $Address & ":" & $Port) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", _ "REG_DWORD", True) EndFunc Func Enables_Disable($BOOL) ;$BOOL True / False RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", _ "REG_DWORD", $BOOL) EndFunc صرح السماء كان هنا Link to comment Share on other sites More sharing options...
cypher175 Posted October 2, 2009 Author Share Posted October 2, 2009 yes, that changes IE's proxy, but dont you have to restart IE for it to actually work or be used though..?? Link to comment Share on other sites More sharing options...
99ojo Posted October 2, 2009 Share Posted October 2, 2009 yes, that changes IE's proxy, but dont you have to restart IE for it to actually work or be used though..??Hi,Why don't you just try it?If you have to, close iex and start it again automatically with AutoIT?;-))Stefan Link to comment Share on other sites More sharing options...
Juvigy Posted October 2, 2009 Share Posted October 2, 2009 Yes. You will have to close IE and open it again for the changes to take effect. Link to comment Share on other sites More sharing options...
wolf9228 Posted October 2, 2009 Share Posted October 2, 2009 (edited) yes, that changes IE's proxy, but dont you have to restart IE for it to actually work or be used though..?? win32_Proxy—SetProxySetting Example http://technet.microsoft.com/en-us/library/bb457096.aspx SetProxySetting Method of the Win32_Proxy Class http://msdn.microsoft.com/en-us/library/aa393589%28VS.85%29.aspx I do not have proxy Address Try this code #Include <Array.au3> Func SetProxySetting($myProxyServer , $myProxyPort) $winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}") $win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy") Dim $Array[1] for $Obj in $win32_Proxy $result = $Obj.SetProxySetting($myProxyServer,$myProxyPort) $Array[UBound($Array) - 1] = $result ReDim $Array[UBound($Array) + 1] next ReDim $Array[UBound($Array) - 1] Return $Array EndFunc Func GetProxySetting() $winmgmts = ObjGet("winmgmts:{impersonationLevel=impersonate}") $win32_Proxy = $winmgmts.InstancesOf ("win32_Proxy") Dim $Array[1][2] for $Obj in $win32_Proxy $Array[UBound($Array) - 1][0] = $Obj.ProxyServer $Array[UBound($Array) - 1][1] = $Obj.ProxyPortNumber ReDim $Array[UBound($Array) + 1][2] next ReDim $Array[UBound($Array) - 1][2] Return $Array EndFunc Edited October 2, 2009 by wolf9228 صرح السماء كان هنا Link to comment Share on other sites More sharing options...
Juvigy Posted October 13, 2009 Share Posted October 13, 2009 Hi Wolf, Any chance for enabling /desabling (the checkboxes) between Autoconfig/AutoProxy/Proxyserver settings? The SetProxySetting Method only deals with Proxy server. What if i want to change the "automatic configuration script" setting or toggle "auto detect settings"? I couldnt find info about that in the win32_proxy class. Link to comment Share on other sites More sharing options...
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