|
You last visited: Today at 08:40
Advertisement
Tratsch rund um Autoit / Autoit Talk | kleinere Fragen
Discussion on Tratsch rund um Autoit / Autoit Talk | kleinere Fragen within the AutoIt forum part of the Coders Den category.
04/03/2013, 16:45
|
#1036
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
versuchs mal so:
$oForm = _IEFormGetCollection($IE,0)
_IEFormElementRadioSelect ($oForm, "Male", "newgender", 1, "byValue")
|
|
|
04/03/2013, 16:49
|
#1037
|
elite*gold: 18
Join Date: Apr 2009
Posts: 199
Received Thanks: 26
|
geht leider nicht. kommt zwar kein fehler, aber er selected nicht
|
|
|
04/03/2013, 16:51
|
#1038
|
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
|
schick mal den link zu der seite, ich schau mal ob ichs hinbekomme
|
|
|
04/03/2013, 17:03
|
#1039
|
elite*gold: 18
Join Date: Apr 2009
Posts: 199
Received Thanks: 26
|
Hast ne pn
/edit: ok, hab einen workaround....
|
|
|
04/04/2013, 19:47
|
#1040
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Quote:
Originally Posted by Achat
Für alle, die die WinHttp.au3 benutzen:
Code:
[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]
Ersetzt alle Sonderzeichen-Tags wie z.B. ÄÖaéèÈ durch das eigentliche Zeichen
Mehr dazu hier:
Download:
MfG
|
Es gibt leider auch so Seiten, bei denen die Kodierung (PHP, UTF-8) nicht stimmt, dazu einfach noch
Code:
Local $aFix[2][7] = [['ä', 'ö', 'ü', 'Ä', 'Ã-', 'Ü', 'ß'],['ä', 'ö', 'ü', 'Ä', 'Ö', 'Ü', 'ß']]
For $i = 0 To UBound($aFix, 2) - 1
$sString = StringReplace($sString, $aFix[0][$i], $aFix[1][$i], 0, 1)
Next
verwenden.
MfG
|
|
|
04/04/2013, 20:08
|
#1041
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
hier mein code :
Code:
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
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 ?
|
|
|
04/04/2013, 20:14
|
#1042
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Quote:
Originally Posted by »FlutterShy™
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 ?
|
Vorher prüfen, ob der Proxy geht:
Code:
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
Wenn du den Systemproxy in der Registry änderst, benutzen andere Browser evtl. auch diesen Proxy!
€: Brauchst du Proxys? PM me
MfG
|
|
|
04/04/2013, 21:15
|
#1043
|
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
|
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?
|
|
|
04/04/2013, 21:34
|
#1044
|
elite*gold: 21
Join Date: Jan 2010
Posts: 1,904
Received Thanks: 462
|
Gibts eine umschließende <form> </form> ?
Wenn ja dann schick ein submit and die Form
|
|
|
04/04/2013, 21:45
|
#1045
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Quote:
Originally Posted by butter123
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?
|
Code:
$aRegExp=StringRegExp($sHTML,'<input id="(.+?)" type="submit" data-profileid="\d+" value="Gefällt mir">',3)
Msgbox(0,0,$aRegExp[0]) ; ID
; MfG
|
|
|
04/07/2013, 03:33
|
#1046
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Code:
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
Ist es egal ob ich TCPRecv($iMainsocket, 1024) oder z.B. TCPRecv($iMainsocket, 1) oder TCPRecv($iMainsocket, 1024000000) schreibe? Hat das Auswirkungen auf die Ladezeit? (mehrere Durchläufe der Schleife).
MfG
Ich möchte den Traffic so gering wie möglich halten.
|
|
|
04/07/2013, 18:33
|
#1047
|
elite*gold: 235
Join Date: Jan 2012
Posts: 920
Received Thanks: 377
|
Ich denke nicht da es ja nicht wartet bis die anzahl durch ist sondern abricht falls dir empfangenen Daten mehr sind als angebene.
|
|
|
04/08/2013, 15:12
|
#1048
|
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
|
Code:
#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
so nachdem mein ie bot jetzt funktioniert ist mir aufgefallen das die proxy funktion nicht geht . mir fällt grade nicht auf was falsch ist . könnt ihr vielleicht mal drüberschauen ?
Und wenn ich die func :
Code:
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
so abrufe wird meisten  kein proxy gesetz und bei der variante oben timeouts
|
|
|
04/08/2013, 15:24
|
#1049
|
elite*gold: 0
Join Date: Mar 2008
Posts: 5
Received Thanks: 0
|
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
|
|
|
04/08/2013, 15:27
|
#1050
|
elite*gold: 528
Join Date: Jan 2012
Posts: 2,127
Received Thanks: 2,403
|
Quote:
Originally Posted by Cyddra
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
|
Hi, schön das du den Sticky Thread benutzt hast!
PixelSearch brauchst du bei festen Positionen nicht.
Wie sehen deine Ziele denn aus? Bzw in welchem Kontext stehen die? Spiel? Browser? GUI etc?
€: Die Koordinaten bekommst du damit:  , im Register "Mouse" .
MfG
|
|
|
Similar Threads
|
[Sammelthread]Fragen zu Autoit wie man Hacks herstellt(Autoit) + Antworten
11/16/2011 - Metin2 - 0 Replies
Hallo Liebe Community,
Ich habe diesen Thread aufgemacht weil manche leute mit Autoit nicht mehr weiterkommen wie man Hack herstellt ,ich habe mit schon ein Multihack mit Autoit herstellt das war einfach .Da viele User nicht weiterkommen werden habe ich mich entschieden ein Thread aufzumachen mit Fragen und ich den dann Antworten kann und helfen kann!
------------------------------------------------- ---------------------------
Mein Multihack:...
|
All times are GMT +1. The time now is 08:40.
|
|