Sign in to follow this  
Followers 0
ChaosZerg

Website Visitor

1 post in this topic

#1 ·  Posted

Hello :)

I am trying to make a website visitor that visits a certain website a few times including proxies.

#include <IE.au3>
#include <File.au3>

HotKeySet("{NUMPAD1}","_Visit")
HotKeySet("{NUMPAD0}","_Terminate")

While 1
    Sleep(250)
Wend

Func _Visit()
    $sWebsite = InputBox("Question","Choose your Website to visit:")
    If FileExists(@ScriptDir & "\proxies.txt") Then
        Local $file = FileOpen(@ScriptDir & "\proxies.txt")
        Local $lCount = _FileCountLines(@ScriptDir & "\proxies.txt")
            For $i = 1 To $lCount Step 1
                $key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
                $reg = RegWrite($key, "ProxyEnable", "REG_DWORD", "1")
                $reg1 = RegWrite($key, "ProxyServer", "REG_SZ", FileReadLine($file, $i))
                DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0)
                $oIE = _IECreate($sWebsite,0,0)
            Next
            FileClose($file)
    Else
        MsgBox("","","Error")
    EndIf
EndFunc

Func _Terminate()
    $key = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
    $reg = RegWrite($key, "ProxyEnable", "REG_DWORD", "0")
    DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0)
    Exit
EndFunc

That's what i've got so far.

My problem is that the internet options resets the etablished connection. Is there a way to make it work, that i have them all connected at once?

Thanks for some help :D

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