No-Tech Posted March 29, 2005 Share Posted March 29, 2005 (edited) Hi,Hello to all AutoIt forum! this is my first AutoIt script, I made it because I sometimes need to fill and activate or disable a proxy in Internet Explorer and cant figure out any other methods. I know it is really bad coding, starting from mouse coordinates are fitted for my Windows Xp. but don't know how to do better for now.. All kind of suggestions are welcome! $answer = MsgBox(4, "Auto Proxy", "Automatic Config Proxy Run?") If $answer = 7 Then MsgBox(0, "Auto Proxy", "OK. Bye!") Exit EndIf ; Run IE Run("C:\program files\internet explorer\iexplore.exe") WinWaitActive("about:blank - Microsoft Internet Explorer") Send("!t") Send("+{DOWN 5}") Send("{ENTER}") MouseClick("left", 455, 81, 1,0) MouseClick("left", 534, 381, 1,0) MouseClick("left", 248, 261, 1,0) MouseClick("left", 320, 293, 2,0) send("192.168.1.1") MouseClick("left", 460, 293, 2,0) send("2020{ENTER}") MouseClick("left", 421, 470, 1,0) send("!f") send("c") Edited March 29, 2005 by No-Tech Link to comment Share on other sites More sharing options...
Insolence Posted March 29, 2005 Share Posted March 29, 2005 You can do it better by changing the actual registry settings Just a suggestion. "I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar. Link to comment Share on other sites More sharing options...
No-Tech Posted March 30, 2005 Author Share Posted March 30, 2005 You can do it better by changing the actual registry settings Just a suggestion.<{POST_SNAPBACK}>Yep! Where I can find the Proxy settings in registry? Windows xp.. Link to comment Share on other sites More sharing options...
Steph Posted March 30, 2005 Share Posted March 30, 2005 Yep! Where I can find the Proxy settings in registry? Windows xp..<{POST_SNAPBACK}>I need to switch the cache on and off a lot depending on where I am with my laptop. These are the functions I use (in a few different scripts) to do it. Registry settings work on XP Pro - not sure about other versions.; Common procedures for writing to registry when handling cache ; Steph, 11/01/2005 Const $RegTree = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" Const $RegKey = "ProxyEnable" Const $CACHE_ON = 1 ; As stored in registry by windows Const $CACHE_OFF = 0 Func ReadCacheStatus() Return(RegRead($RegTree, $RegKey)) EndFunc Func UseCache() SwitchReg($CACHE_ON) EndFunc Func NoCache() SwitchReg($CACHE_OFF) EndFunc Func SwitchReg($value) RegWrite($RegTree, $RegKey, "REG_DWORD", $value) EndFuncSteph Link to comment Share on other sites More sharing options...
No-Tech Posted April 23, 2005 Author Share Posted April 23, 2005 I need to switch the cache on and off a lot depending on where I am with my laptop. These are the functions I use (in a few different scripts) to do it. Registry settings work on XP Pro - not sure about other versions.; Common procedures for writing to registry when handling cache ; Steph, 11/01/2005 Const $RegTree = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" Const $RegKey = "ProxyEnable" Const $CACHE_ON = 1 ; As stored in registry by windows Const $CACHE_OFF = 0 Func ReadCacheStatus() Return(RegRead($RegTree, $RegKey)) EndFunc Func UseCache() SwitchReg($CACHE_ON) EndFunc Func NoCache() SwitchReg($CACHE_OFF) EndFunc Func SwitchReg($value) RegWrite($RegTree, $RegKey, "REG_DWORD", $value) EndFuncSteph<{POST_SNAPBACK}>So,how do i use your script? 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