so I got a script written in python collecting HQ Proxies and saving them into a .txt file.
What I now want to do is.
AHK should visit a certain website. After it visited the website and purchased something it should change my proxy which I provide from the .txt file.
(I need to purchase alot of products from this website but it blocks my IP after 2 purchases)
I found out how to put in 1 proxy but it should randomly choose from the .txt file or is it possible to implent alot of proxies in the ahk script and it choose a proxy random and bans the already used one?
This is the proxy part.
Code: Select all
;Set proxy via Registry
setproxy("192.168.20.112:3128","ON")
;Set Home Page, Change http://google.com to whatever you want
RegWrite,REG_SZ,HKCU,Software\microsoft\Internet Explorer\Main,Start Page,http://google.com
;Set ProxyOverride to your exception list separated by ';'
regwrite,REG_SZ,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,ProxyOverride,exception1;exception2;exception3
return
;Function to SetProxy
setproxy(address = "",state = ""){
if (address = "") and (state = "")
state = TOGGLE
if address
regwrite,REG_SZ,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,ProxyServer,%address%
if (state ="ON")
regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,1
else if (state="OFF")
regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,0
else if (state = "TOGGLE")
{
if regread("HKCU","Software\Microsoft\Windows\CurrentVersion\Internet Settings","Proxyenable") = 1
regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,0
else if regread("HKCU","Software\Microsoft\Windows\CurrentVersion\Internet Settings","Proxyenable") = 0
regwrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Internet Settings,Proxyenable,1
}
dllcall("wininet\InternetSetOptionW","int","0","int","39","int","0","int","0")
dllcall("wininet\InternetSetOptionW","int","0","int","37","int","0","int","0")
Return
}
RegRead(RootKey, SubKey, ValueName = "") {
RegRead, v, %RootKey%, %SubKey%, %ValueName%
Return, v
}