versuchs mal so:
$oForm = _IEFormGetCollection($IE,0)
_IEFormElementRadioSelect ($oForm, "Male", "newgender", 1, "byValue")
$oForm = _IEFormGetCollection($IE,0)
_IEFormElementRadioSelect ($oForm, "Male", "newgender", 1, "byValue")
Es gibt leider auch so Seiten, bei denen die Kodierung (PHP, UTF-8) nicht stimmt, dazu einfach nochQuote:
Für alle, die die WinHttp.au3 benutzen:
Ersetzt alle Sonderzeichen-Tags wie z.B. ÄÖaéèÈ durch das eigentliche ZeichenCode:[noparse] Func _HtmlUnicodeDecodeAll($sString) Local Static $sHTML = BinaryToString(InetRead('http://de.selfhtml.org/html/referenz/zeichen.htm')) Local $aRegExp = StringRegExp($sHTML, '<td class="doctop"><span class="unicode">&.+;</span></td>\r\n' & _ '<td class="tabxpl">.+</td>\r\n' & _ '<td class="code"><code>&(\w+);</code></td>\r\n' & _ '<td class="code"><code>&#(\d+);</code></td>', 3) If UBound($aRegExp) < 2 Or Mod(UBound($aRegExp), 2) <> 0 Then Return SetError(1, 0, 0) For $i = 0 To UBound($aRegExp) - 2 Step 2 $sString = StringReplace($sString, '&' & $aRegExp[$i] & ';', ChrW($aRegExp[$i + 1]), 0, 1) $sString = StringReplace($sString, '&#' & $aRegExp[$i + 1] & ';', ChrW($aRegExp[$i + 1]), 0, 1) Next Return $sString EndFunc ;==>_HtmlUnicodeDecodeAll [/noparse]
Mehr dazu hier: [Only registered and activated users can see links. Click Here To Register...]
Download: [Only registered and activated users can see links. Click Here To Register...]
MfG
Local $aFix[2][7] = [['ä', 'ö', 'ü', 'Ä', 'Ã-', 'Ü', 'ß'],['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü', 'ß']] For $i = 0 To UBound($aFix, 2) - 1 $sString = StringReplace($sString, $aFix[0][$i], $aFix[1][$i], 0, 1) Next
Func _click()
$link = GUICtrlRead($input1)
$anzahl = GUICtrlRead($Input2)
Do
$line = FileReadLine($file)
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "00000001")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", $line)
Sleep(1000)
$IE = _IECREATEEMBEDDED()
$Bot = GUICreate("Form1", 800, 800);Erstellt eine neue GUI
GUICtrlCreateObj($IE, 0, 0, 800, 800);Erstellt ein neues Objekt
GUISetState(@SW_HIDE);Macht das fenster unsichtbar
$Navi = _ienavigate($IE, $link)
Sleep(7500)
$HTML = _IEDocReadHTML($IE)
FileWrite("quell.txt",$HTML)
Sleep(1000)
$i = $i + 1
GUICtrlSetData($Label1,"Done : " &$i& "/" & $anzahl)
$string = _StringBetween($HTML,'<font color="green">','</font>')
MsgBox(1,"",$string[0])
Until $i = $anzahl
EndFunc
Vorher prüfen, ob der Proxy geht:Quote:
so nun timeoutet der browser oft wegen defekten proxies und die func geht nicht weiter , was kann ich da machen bzw sieht jemand noch einen anderen fehler ?
Func _ProxyIsUp($sProxyIP) Local $aIP = StringRegExp($sProxyIP, '(\d+\.\d+\.\d+\.\d+)', 3) If Not IsArray($aIP) Then Return SetError(1,0,False) Switch Ping($aIP[0], 520) Case 0 Return False Case Else Return True EndSwitch EndFunc ;==>_ProxyIsUp
Quote:
moin,
ich will den facebook like button ansprechen
<input id="u_0_10" type="submit" data-profileid="157697300924538" value="Gefällt mir"></input>
nur type und value sind immer bei dem button gleich. id ändert sich. wie mach ich das dann?
$aRegExp=StringRegExp($sHTML,'<input id="(.+?)" type="submit" data-profileid="\d+" value="Gefällt mir">',3) Msgbox(0,0,$aRegExp[0]) ; ID ; MfG
For $i = 1 To 13
$hTimer = TimerInit()
ConsoleWrite(_EpvpImgTitle() & @TAB & Round(TimerDiff($hTimer)) & @CRLF)
Next
Func _EpvpImgTitle()
TCPStartup()
Local $iMainsocket = TCPConnect(TCPNameToIP('epvpimg.com'), 80)
TCPSend($iMainsocket, 'GET / HTTP/1.1' & @CRLF & _
'Host: epvpimg.com' & @CRLF & _
'Connection: keep-alive' & @CRLF & @CRLF)
Local $sRecv = ''
Do
$sRecv = TCPRecv($iMainsocket, 1)
Until $sRecv <> ''
Do
$sRecv &= TCPRecv($iMainsocket, 1024)
Until @error Or StringInStr($sRecv, '</title>')
TCPCloseSocket($iMainsocket)
TCPShutdown()
Return StringReplace(StringRegExpReplace($sRecv, '(?s)(?:.*<title>epvpImg: (.+?)</title>.*)', '\1'),'<','<')
EndFunc ;==>_EpvpImgTitle
#RequireAdmin
Global $i = 0
Global $file = "proxies.txt"
Global $timeoutset = 0
Global $error = FileRead("quell.txt")
Global $false = FileRead("false.txt")
Global $read = 0
Global $stop = False
Global $true = True
Global $set = "set"
HotKeySet("{ESC}","_end")
HotKeySet("{F10}","_stopper")
#include <string.au3>
#include <ie.au3>
#include <file.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("lala", 339, 119, 192, 124)
$Input1 = GUICtrlCreateInput("www.myip.is/", 24, 24, 177, 21)
$Input2 = GUICtrlCreateInput("drück count proxies", 24, 48, 177, 21)
$Group1 = GUICtrlCreateGroup("Settings", 8, 8, 201, 73)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Start !", 216, 16, 115, 25)
$Button2 = GUICtrlCreateButton("Count Proxies", 216, 48, 115, 25)
$Label1 = GUICtrlCreateLabel("Done : 0/0", 16, 88, 188, 17)
$Label2 = GUICtrlCreateLabel("Proxies :", 216, 88, 116, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
_end()
Case $Button1
_start()
Case $Button2
_count()
EndSwitch
WEnd
Func _start()
$anzahl = GUICtrlRead($Input2)
Global $IE = _IECreateEmbedded()
Global $BOT = GUICreate("Form1", 800, 800)
While 1
_setproxy()
;_openie()
;_delproxy()
If $i = $anzahl Then
ExitLoop
EndIf
WEnd
EndFunc
Func _setproxy()
$read = $read + 1
Global $line = FileReadLine($file,$read)
If _ProxyIsUp($line) Then
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "00000001")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", $line)
ConsoleWrite("proxy online " & $line)
Sleep(100)
_openie()
Else
ConsoleWrite("proxy offline " & $line)
EndIf
EndFunc
Func _openie()
$link = GUICtrlRead($Input1)
$anzahl = GUICtrlRead($Input2)
$session = GUICtrlCreateObj($IE, 0, 0, 800, 800)
GUISetState(@SW_SHOW)
$Navi = _IENavigate($IE, $link,0)
$wait = _IELoadWait($IE,0,30000)
Sleep(8000)
$i = $i + 1
GUICtrlSetData($Label1,"Done : " &$i& "/" & $anzahl)
ConsoleWrite("True "&$line&@CRLF)
;_delproxy()
If $i = $anzahl Then
_sleeper()
EndIf
ConsoleWrite("IE Quit " & $line)
_IEQuit($session)
EndFunc
Func _delproxy()
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "00000000")
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "")
EndFunc
Func _count()
$lines = _FileCountLines($file)
GUICtrlSetData($Label2,"Proxies : "&$Lines)
GUICtrlSetData($Input2,$lines)
EndFunc
Func _end()
;RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyEnable", "REG_DWORD", "00000000")
;RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "")
FileClose($file)
Exit
EndFunc
Func _ProxyIsUp($sProxyIP)
Local $aIP = StringRegExp($sProxyIP, '(\d+\.\d+\.\d+\.\d+)', 3)
If Not IsArray($aIP) Then Return SetError(1,0,False)
Switch Ping($aIP[0], 520)
Case 0
Return False
Case Else
Return True
EndSwitch
EndFunc ;==>_ProxyIsUp
Func _stopper()
Global $stop = True
EndFunc
Func _sleeper()
While 1
sleep(100)
If $stop = True Then
ExitLoop
EndIf
WEnd
EndFunc
Func _start()
$anzahl = GUICtrlRead($Input2)
Global $IE = _IECreateEmbedded()
Global $BOT = GUICreate("Form1", 800, 800)
While 1
_setproxy()
_openie()
_delproxy()
If $i = $anzahl Then
ExitLoop
EndIf
WEnd
EndFunc
Hi, schön das du den Sticky Thread benutzt hast!Quote:
Huhu!
Ich möchte eine Schleife schreiben, in der drei Ziele (feste Position) die nacheinander auftauchen, angeklickt werden.
Ist da dieses Pixelsearch am besten geeignet?
Grüße
Cyddra