Sign in to follow this  
Followers 0
No-Tech

Internet Explorer Proxy

5 posts in this topic

#1 ·  Posted (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 by No-Tech

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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)
EndFunc

Steph

Share this post


Link to post
Share on other sites

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)
EndFunc

Steph

<{POST_SNAPBACK}>

So,how do i use your script?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0