|
You last visited: Today at 17:50
Advertisement
IE.au3 fehler im script
Discussion on IE.au3 fehler im script within the AutoIt forum part of the Coders Den category.
04/05/2013, 12:28
|
#1
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
IE.au3 fehler im script
So hier erstmal das script :
Code:
Global $i = 0
Global $file = "proxies.txt"
Global $timeoutset = 0
Global $error = FileRead("quell.txt")
Global $false = FileRead("false.txt")
HotKeySet("{ESC}","_end")
#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.google.de", 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
_click()
Case $Button2
_count()
EndSwitch
WEnd
Func _click()
$read = 0
$stop = false
$link = GUICtrlRead($Input1)
$anzahl = GUICtrlRead($Input2)
$IE = _IECreateEmbedded()
$BOT = GUICreate("Form1", 800, 800)
GUICtrlCreateObj($IE, 0, 0, 800, 800)
GUISetState(@SW_SHOW)
While 1
$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)
Sleep(100)
$Navi = _IENavigate($IE, $link)
_IELoadWait($IE)
$HTML = _IEDocReadHTML($IE)
$error = FileRead("quell.txt")
$false = FileRead("false.txt")
If $HTML = $error or $false Then ; timeout quelltext da
ConsoleWrite("false "&$line&@CRLF)
Else ; wenn nicht
Sleep(8000)
FileWrite("true.txt",$HTML)
$i = $i + 1
GUICtrlSetData($Label1,"Done : " &$i& "/" & $anzahl)
ConsoleWrite("True "&$line&@CRLF)
If $i = $anzahl Then
Exit
EndIf
EndIf
Else
ConsoleWrite("proxie down "&$line&@CRLF)
EndIf
WEnd
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
ihr braucht dazu im gleichen ordner noch :
das sind txt dateien eine mit proxies und 2 mit quelltexten drinne die im script überprüft werden sollen
die probleme sind jetzt :
1.)er geht mit proxies nicht auf die seiten (auch nicht google)
2.)
Code:
If $HTML = $error or $false Then ; timeout quelltext da
ConsoleWrite("false "&$line&@CRLF)
Else ; wenn nicht
Sleep(8000)
FileWrite("true.txt",$HTML)
$i = $i + 1
GUICtrlSetData($Label1,"Done : " &$i& "/" & $anzahl)
ConsoleWrite("True "&$line&@CRLF)
If $i = $anzahl Then
Exit
EndIf
EndIf
das else kommt nie zustande obwohl der quelltext abweicht
was mache ich bloß falsch ? und nicht mekkern das da eine for schleife fehlt bei :
Code:
While 1
$read = $read + 1
Global $line = FileReadLine($file,$read)
da es nicht geht musste ich auch noch keine reinbauen
|
|
|
04/05/2013, 12:33
|
#2
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|

wait auf 0 setzen

Timeout auf 30 Sek. setzen (30000 ms), wenn Rückgabewert 0 dann abbrechen.
MfG
|
|
|
04/05/2013, 12:40
|
#3
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
geht nicht falls ich es denn so richtig gemacht habe :
Code:
Func _click()
$read = 0
$stop = false
$link = GUICtrlRead($Input1)
$anzahl = GUICtrlRead($Input2)
$IE = _IECreateEmbedded()
$BOT = GUICreate("Form1", 800, 800)
GUICtrlCreateObj($IE, 0, 0, 800, 800)
GUISetState(@SW_SHOW)
While 1
$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)
Sleep(100)
$Navi = _IENavigate($IE, $link,0)
$wait = _IELoadWait($IE,0,30000)
If $wait = 0 Then
ConsoleWrite("wait = 0 "&@CRLF)
Else
$HTML = _IEDocReadHTML($IE)
$error = FileRead("quell.txt")
$false = FileRead("false.txt")
If $HTML = $error or $false Then
ConsoleWrite("false "&$line&@CRLF)
Else
Sleep(8000)
FileWrite("true.txt",$HTML)
$i = $i + 1
GUICtrlSetData($Label1,"Done : " &$i& "/" & $anzahl)
ConsoleWrite("True "&$line&@CRLF)
If $i = $anzahl Then
Exit
EndIf
EndIf
EndIf
Else
ConsoleWrite("proxie down "&$line&@CRLF)
EndIf
WEnd
EndFunc
|
|
|
 |
Similar Threads
|
IS-Buy script by !Hen Fehler!
05/16/2012 - Metin2 Private Server - 2 Replies
<?PHP
if(isset($_SESSION) && checkInt($_SESSION) && $_SESSION>=0) {
if(isset($_GET) && checkInt($_GET)) {
$sqlCmd="SELECT vnum, preis, attrtype0, attrvalue0, attrtype1, attrvalue1, attrtype2, attrvalue2, attrtype3, attrvalue3, attrtype4, attrvalue4, attrtype5, attrvalue5, attrtype6, attrvalue6, socket0, socket1, socket2 FROM ".SQL_HP_DB.".is_items WHERE id='".$_GET."' LIMIT 1";
$sqlQry=mysql_query($sqlCmd,$sqlHp);
if(mysql_num_rows($sqlQry)==1) {
|
hen! Script Fehler
07/18/2011 - Metin2 Private Server - 2 Replies
Ich hab gerade diese Homepage installiert und es kommt diese Meldung
http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/1305844-release-professionelle-me tin2-homepage-ownii-sora.html
Warning: date() : It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone...
|
Hen Script fehler HELP!!
07/06/2011 - Metin2 Private Server - 3 Replies
Hey , ich wollte heute mal wieder meine Homepage für den Server auf nen Webspace klatschen ( am webspace liegt es nicht )
habe die install.php ausgeführt alles tip top soweit ..
dann steht da aber :
Es tut uns leid es konnte keiner Verbindung zur Datenbank hergestellt werden.
Naja ich nehme mir das blanke CMS von hen und tada damit geht es . auch mit jedem andern script.
selbst wenn ich den ganzen INC ordnder von dem script nehme wo es geht und in ihn in das script stecke wo es nicht...
|
fehler im script? pls help
08/04/2010 - AutoIt - 9 Replies
hallo liebe epvper ;D
ich hab ein problem mit meinem WoW launcher den ich mir per autoit bastel
wenn ich das erste mal den button drücke dann speichert das script den pfad in eine ini und soll beim neustarten des scriptes den pfad lesen und dann auch verwenden
leider macht es das nicht und ich weiß nicht warum und deswegen will ich mir rat bei euch holen
hier das script:
(bruchteil)
|
fehler im script
07/23/2010 - AutoIt - 10 Replies
Hi ein kumpel hat mir mal seinen script geschickt der bei den browsergame die stämme spieler einladen soll^^. Er hat neuerdings auch einen fehler das die stammeslosen spieler pro kontinent nicht in der txt datei gespeichert werden und ich und er wissen nicht warum^^.
hier mal der script:
#RequireAdmin
#Region
#EndRegion
Func _ARRAYADD(ByRef $AVARRAY, $VVALUE)
If Not IsArray($AVARRAY) Then Return SetError(1, 0, -1)
If UBound($AVARRAY, 0) <> 1 Then Return SetError(2, 0, -1)
Local...
|
All times are GMT +1. The time now is 17:50.
|
|