
Originally Posted by
p-dave
Could you create one that doesnt stay running? Ie cick on the shorcut and you then can press 'turn on proxy' or 'turn off proxy'
Used to have one made by autoit v3. But I needed to change the proxy settings, and could never seem to be able to remake it, kept coming up with errors
You mean similar to this ? Edit to your requirements.....
Code:
; AutoIt Version: 3.2.0.1
; Language: English
; Platform: WinXP
; Author: Matt
; Script Function: Proxy Switcher
; Version: 1.0
; Date: Sept 2009
#include <GUIConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Proxy Switcher", 220, 110, 348, 309)
$helpmenu = GUICtrlCreateMenu("Help")
$infoitem = GUICtrlCreateMenuItem("About", $helpmenu)
GUISetBkColor(0x0066FF)
$Button1 = GUICtrlCreateButton("Proxy On", 10, 20, 89, 49)
$Button2 = GUICtrlCreateButton("Proxy Off", 120, 20, 89, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Select
Case $nMsg = $Button1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "First Home Page", "REG_SZ", "http://navaho")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://navaho")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "10.0.0.2:8080")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "Proxyenable", "REG_DWORD", "1")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyOverride", "REG_SZ", "intranet")
Run('C:\Program Files\Internet Explorer\iexplore.exe')
Exit
Case $nMsg = $Button2
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "First Home Page", "REG_SZ", "http://www.google.co.uk")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page", "REG_SZ", "http://www.google.co.uk")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "Proxyenable", "REG_DWORD", "0")
Run('C:\Program Files\Internet Explorer\iexplore.exe')
Exit
Case $nMsg = $infoitem
MsgBox(0, "Proxy Switcher 1.0", "Written By Matt" & @CRLF & "Comments & Suggestions to:" & @CRLF & "Email@Email.com")
EndSelect
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd