Hey
Wenn du den Status der Boxen nur einmalig überpüfen willst, dann musst du einfach endlosschleife While 1 weglassen.
mfg Darter
Hey
Wenn du den Status der Boxen nur einmalig überpüfen willst, dann musst du einfach endlosschleife While 1 weglassen.
mfg Darter
Hey
Wenn du dir For schleifen von 0 an laufen lässt brauchst du nacher nciht jedes mal 1 abziehen aber so kannst du prüfen ob die checkbox markiert oder eben nicht ist
While 1
For $z = 0 to $i ;einfach von 0 an laufen lassen
If GUICtrlRead($ahdlRadio[$z]) = $GUI_CHECKED Then ; wahlweise auch $GUI_UNCHECKED
MsgBox(0,"hallo","")
EndIf
Next
WEnd
EDIT: auch sowas würde funktionieren:
While 1
For $z = 0 to $i
Switch GUICtrlRead($ahdlRadio[$z])
Case $GUI_CHECKED
MsgBox(0,"hallo","CHECKED")
Case $GUI_UNCHECKED
MsgBox(0,"hallo","UNCHECKED")
EndSwitch
Next
WEnd
Ich hab die Lösung doch bereits genannt
Als 32 Bit ausführen und es klappt.
hat damit nichts zu tun ![]()
Man man leute viel drummherum um nix.
Der ersteller der ImageSearch UDF hat geschlampt und eine Überprüfung in der UDF vergessen.
Wenn der genannte Fehler auftaucht, dann ist entweder die Dll nicht vorhanden oder beschädigt.
Ich gehe einfach mal davon aus, dass du die ImageSearchDLL gar nciht hast, deshalb lad dir die einfach mal runter und leg sie ins Scriptverzeichniss.
Ab win Vista kann auch #RequireAdmin etwas bringen.
EDIT:
Wenn man die UDF so Modifiziert entsteht dieser error nicht und gibt stattdessen einfach -1 Zurück
#include-once
; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.0
; Language: English
; Description: Functions that assist with Image Search
; Require that the ImageSearchDLL.dll be loadable
;
; ------------------------------------------------------------------------------
If not FileExists("ImageSearchDLL.dll") Then MsgBox(0,"","DLL nicht gefunden")
;===============================================================================
;
; Description: Find the position of an image on the desktop
; Syntax: _ImageSearchArea, _ImageSearch
; Parameter(s):
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
; Dll error - Returns -1
;
; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify
; a desktop region to search
;
;===============================================================================
Func _ImageSearch($findImage,$resultPosition,ByRef $x, ByRef $y,$tolerance, $HBMP=0)
return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance,$HBMP)
EndFunc
Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom,ByRef $x, ByRef $y, $tolerance,$HBMP=0)
;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom)
if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage
$result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage,"hwnd",$HBMP)
; If error exit modified by Darter Autoit.de
If IsArray($result) Then
if $result[0]="0" then return 0
Else
Return -1
EndIf
;Old exit
;if $result[0]="0" then return 0
; Otherwise get the x,y location of the match and the size of the image to
; compute the centre of search
$array = StringSplit($result[0],"|")
$x=Int(Number($array[2]))
$y=Int(Number($array[3]))
if $resultPosition=1 then
$x=$x + Int(Number($array[4])/2)
$y=$y + Int(Number($array[5])/2)
endif
return 1
EndFunc
;===============================================================================
;
; Description: Wait for a specified number of seconds for an image to appear
;
; Syntax: _WaitForImageSearch, _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the image to locate on the desktop
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns 1
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImageSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance,$HBMP=0)
$waitSecs = $waitSecs * 1000
$startTime=TimerInit()
While TimerDiff($startTime) < $waitSecs
sleep(100)
$result=_ImageSearch($findImage,$resultPosition,$x, $y,$tolerance,$HBMP)
if $result > 0 Then
return 1
EndIf
WEnd
return 0
EndFunc
;===============================================================================
;
; Description: Wait for a specified number of seconds for any of a set of
; images to appear
;
; Syntax: _WaitForImagesSearch
; Parameter(s):
; $waitSecs - seconds to try and find the image
; $findImage - the ARRAY of images to locate on the desktop
; - ARRAY[0] is set to the number of images to loop through
; ARRAY[1] is the first image
; $tolerance - 0 for no tolerance (0-255). Needed when colors of
; image differ from desktop. e.g GIF
; $resultPosition - Set where the returned x,y location of the image is.
; 1 for centre of image, 0 for top left of image
; $x $y - Return the x and y location of the image
;
; Return Value(s): On Success - Returns the index of the successful find
; On Failure - Returns 0
;
;
;===============================================================================
Func _WaitForImagesSearch($findImage,$waitSecs,$resultPosition,ByRef $x, ByRef $y,$tolerance,$HBMP=0)
$waitSecs = $waitSecs * 1000
$startTime=TimerInit()
While TimerDiff($startTime) < $waitSecs
for $i = 1 to $findImage[0]
sleep(100)
$result=_ImageSearch($findImage[$i],$resultPosition,$x, $y,$tolerance,$HBMP)
if $result > 0 Then
return $i
EndIf
Next
WEnd
return 0
EndFunc
mfg Darter
hmm dann hab ich die wohl letztens beim aufraumen gelöscht ![]()
EDIT: Ok hab mir schnell die UDF runtergeladen. Schelcht aussehen tuts ja nicht aber das ganze ist noch sehr verkürzbar:
#include <WindowsConstants.au3>
#include <GuiConstantsEx.au3>
#Include <Color.au3>
Opt("GUIOnEventMode", 1)
[/autoit] [autoit][/autoit] [autoit]Global $RGB[3] = [255, 0, 0]
Global $Index[3][6] = [[1,0,2,1,0,2],[255,0,255,0,255,0],["+","-","+","-","+","-"]]
$Color = _ColorSetRGB( $RGB )
$gui = GUICreate( "test", 400, 400)
GUISetBkColor( $Color, $gui )
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
GUISetState(@SW_SHOW)
While 1
For $i = 0 To UBound($Index,2)-1
Do
$RGB[$Index[0][$i]] = Execute($RGB[$Index[0][$i]] & $Index[2][$i] & 1)
$Color = _ColorSetRGB( $RGB )
GUISetBkColor( $Color, $gui )
Sleep(10)
Until $RGB[$Index[0][$i]] = $Index[1][$i]
Next
WEnd
Func _Exit()
Exit
EndFunc
Hey.
Mir fehlt diese Color UDF
vllt mal schnell hochladen.
mfg Darter
Hey.
Erstmal ist das ein ding von 5 min und dann macht es doch wenig sinn seine Passwörter zu Crypten und gleichzeitig den Verschlüsselungskey abzuspeichern ![]()
Hey.
Die Festplatten ID oder wie man das genau nennt ist immer gleich, natürlich nur solange, wie die selbe festplatte im PC ist^^
ok ich brauch für 47.000 seiten die geparsed werden jetzt 10 std ;P
also 1.3 seiten pro sekunde.....
laaahm
Naja aber du musst ja jetzte seite Laden um sie Speichern zu können.
Zitatja die seite wird geladen, aber das nur traffic der bei meiner anbindung nicht wirklich von bedeutung ist
Naja su willst dan den Quellcode ran richtig? und nichts anders wird über TCPRecv() empfangen
und wieso dann nciht einfach so:
[autoit]RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "Der Name", "REG_SZ", @HomeDrive &'\Ordner1\Ordner2\Ordner3\Ordner4\Ordner5\Datei.exe" -SelfLaunch')
[/autoit]Auszug aus der hilfe zu dem Marco @HomeDrive:
ZitatLaufwerksbuchstabe des Laufwerkes, welches das Hauptverzeichnis des aktuellen Benutzers beherbergt (Systemlaufwerk %SYSTEMDRIVE% ).
Darf man fragen warum?
Von der geschiwindigkeit macht das mit sicherheit nichts aus, denn die Seite muss so oder so immer neu Geladen werden, da es ja jedes mal eine andere ist.
Deshalb verstehich das jetzt nicht ganz
So funktionierts bei mir wunderbar :
For $i = 100000001 To 100000005;186000075
$aRet = _TCP_Send_Request("GET", "aion.yg.com", "/item/bla?id=" & $i)
FileWrite(@ScriptDir & "\Seite" & $i & ".html",$aRet[1])
Next
Func _TCP_Send_Request($sTyp, $sHost, $sPage, $sReferer = "", $sCookie = "", $sPost = "", $bWontReturn = 0)
;=> Autor: Darter
Local $sPacket, $Recv,$aCookies, $aRecv, $sHeader, $sBody, $aReturn[3], $sCookies
TCPStartup()
$Socket = TCPConnect(TCPNameToIP($sHost),80)
Switch $sTyp
Case "GET"
$sPacket = "GET " & $sPage & " HTTP/1.1" & @CRLF & _
"Host: " & $sHost & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.4) Gecko/20100611 AskTbUT2V5/3.8.0.12304 Firefox/3.6.4" & @CRLF & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & @CRLF & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" & @CRLF & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF & _
"Keep-Alive: 115" & @CRLF & _
"Connection: keep-alive" & @CRLF
If $sReferer <> "" Then $sPacket &= "Referer: " & $sReferer & @CRLF
If $sCookie <> "" Then $sPacket &= "Cookie: " & $sCookie & @CRLF
;$sPacket &= "Cache-Control: max-age=0" & @CRLF & @CRLF
$sPacket &= @CRLF
Case "POST"
$sPacket = "POST " & $sPage & " HTTP/1.1" & @CRLF & _
"Host: " & $sHost & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.4) Gecko/20100611 AskTbUT2V5/3.8.0.12304 Firefox/3.6.4" & @CRLF & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & @CRLF & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" & @CRLF & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF & _
"Keep-Alive: 115" & @CRLF & _
"Connection: keep-alive" & @CRLF
If $sReferer <> "" Then $sPacket &= "Referer: " & $sReferer & @CRLF
If $sCookie <> "" Then $sPacket &= "Cookie: " & $sCookie & @CRLF
$sPacket &= "Content-Type: application/x-www-form-urlencoded" & @CRLF & _
"Content-Length: " & StringLen($sPost) & @CRLF & @CRLF & $sPost
Case Else
Return SetError(1, "", "0")
EndSwitch
TCPSend($Socket, $sPacket)
Local $Timeout_Timer = TimerInit()
Do
$Recv = TCPRecv($Socket,1024)
Until $Recv <> "" Or TimerDiff($Timeout_Timer) > 5000
$Timeout_Timer = TimerInit()
[/autoit] [autoit][/autoit] [autoit]Do
$Recv &= TCPRecv($Socket,1024)
Until @error Or StringInStr($Recv,"</html>") Or $bWontReturn Or TimerDiff($Timeout_Timer) > 5000
If not $bWontReturn Then
$aRecv = StringSplit($Recv,@CRLF,1)
If IsArray($aRecv) Then
For $i = 1 To $aRecv[0]
If $aRecv[$i] <> "" Then
$sHeader &= $aRecv[$i] & @CRLF
Else
ExitLoop
EndIf
Next
For $a = $i To $aRecv[0]
$sBody &= $aRecv[$a] & @CRLF
Next
$aReturn[0] = $sHeader
$aReturn[1] = $sBody
;ConsoleWrite($sBody & @CRLF)
Else
Return SetError(2,"",0)
EndIf
If StringInStr($Recv, "Set-Cookie: ") Then
$aCookies = StringRegExp($Recv,"Set-Cookie:([^;]+)")
For $i = 0 To $aCookies[0]
$sCookies &= $aCookies[$i] & ";"
Next
$aReturn[2] = StringTrimRight($sCookies,1)
EndIf
TCPCloseSocket($Socket)
TCPShutdown()
Return $aReturn
EndIf
EndFunc ;==>_TCP_Send_Request
EDIT: Wieso ist den meine FUnc nicht so wie ich sie letztens hatte. Da hats mir bei dem Stromausfall letztens tatsächlich meine änderungngen nicht gespeichert :wacko:
mfg Darter
Hey.
Du solltest das Packet genau inmitieren, damit es Funktioniert.
So dürfte es gehen:
#cs
statt: 'GET http://aion.yg.com/item/bla?id=100000276 HTTP/1.1'
einfach: 'GET /item/bla?id=100000276 HTTP/1.1'
Also nicht nochmal den Kompletten Link sonder nur die Seite
beim host statt: http://www.aion.yg.com
einfach: aion.yg.com
#ce
#cs
GET /item/bla?id=100000276 HTTP/1.1
Host: aion.yg.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Cache-Control: max-age=0
#ce
TCPStartup()
[/autoit] [autoit][/autoit] [autoit]$packet = 'GET /item/bla?id=100000276 HTTP/1.1' & @CRLF & _
'Host: aion.yg.com' & @CRLF & _
'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)' & @CRLF & _
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' & @CRLF & _
'Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3' & @CRLF & _
'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7' & @CRLF & _
'Keep-Alive: 500' & @CRLF & _
'Content-Type: application/x-www-form-urlencoded' & @CRLF & _
'Connection: keep-alive' & @CRLF & @CRLF
$sock = TCPConnect("174.132.33.132", 80)
TCPSend($sock, $packet)
do
$rec = TCPRecv($sock,1024)
until $rec <> ""
do
$rec &= TCPRecv($sock,1024)
until @error Or StringInStr($rec,"</html>"); Wenn </hmtl> ist alles gesendet
filewrite(fileopen("tmp.txt",2),$rec)
TCPShutdown()
Anbei noch ne kleine Funk von mir :
Func _TCP_Send_Request($sTyp, $sHost, $sPage, $sReferer = "", $sCookie = "", $sPost = "", $bWontReturn = 0)
;=> Autor: Darter
Local $sPacket, $Recv,$aCookies, $aRecv, $sHeader, $sBody, $aReturn[3], $sCookies
TCPStartup()
$Socket = TCPConnect(TCPNameToIP($sHost),80)
Switch $sTyp
Case "GET"
$sPacket = "GET " & $sPage & " HTTP/1.1" & @CRLF & _
"Host: " & $sHost & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.4) Gecko/20100611 AskTbUT2V5/3.8.0.12304 Firefox/3.6.4" & @CRLF & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & @CRLF & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" & @CRLF & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF & _
"Keep-Alive: 115" & @CRLF & _
"Connection: keep-alive" & @CRLF
If $sReferer <> "" Then $sPacket &= "Referer: " & $sReferer & @CRLF
If $sCookie <> "" Then $sPacket &= "Cookie: " & $sCookie & @CRLF
;$sPacket &= "Cache-Control: max-age=0" & @CRLF & @CRLF
$sPacket &= @CRLF
Case "POST"
$sPacket = "POST " & $sPage & " HTTP/1.1" & @CRLF & _
"Host: " & $sHost & @CRLF & _
"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.4) Gecko/20100611 AskTbUT2V5/3.8.0.12304 Firefox/3.6.4" & @CRLF & _
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" & @CRLF & _
"Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3" & @CRLF & _
"Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" & @CRLF & _
"Keep-Alive: 115" & @CRLF & _
"Connection: keep-alive" & @CRLF
If $sReferer <> "" Then $sPacket &= "Referer: " & $sReferer & @CRLF
If $sCookie <> "" Then $sPacket &= "Cookie: " & $sCookie & @CRLF
$sPacket &= "Content-Type: application/x-www-form-urlencoded" & @CRLF & _
"Content-Length: " & StringLen($sPost) & @CRLF & @CRLF & $sPost
Case Else
Return SetError(1, "", "0")
EndSwitch
TCPSend($Socket, $sPacket)
Local $Timeout_Timer = TimerInit()
Do
$Recv = TCPRecv($Socket,1024)
Sleep(150)
Until $Recv <> "" Or TimerDiff($Timeout_Timer) > 5000
$Timeout_Timer = TimerInit()
[/autoit] [autoit][/autoit] [autoit]Do
$Recv &= TCPRecv($Socket,1024)
Sleep(150)
Until @error Or StringInStr($Recv,"</html>") Or $bWontReturn Or TimerDiff($Timeout_Timer) > 5000
If not $bWontReturn Then
$aRecv = StringSplit($Recv,@CRLF,1)
If IsArray($aRecv) Then
For $i = 1 To $aRecv[0]
If $aRecv[$i] <> "" Then
$sHeader &= $aRecv[$i] & @CRLF
Else
ExitLoop
EndIf
Next
For $a = $i To $aRecv[0]
$sBody &= $aRecv[$a] & @CRLF
Next
$aReturn[0] = $sHeader
$aReturn[1] = $sBody
;ConsoleWrite($sBody & @CRLF)
Else
Return SetError(2,"",0)
EndIf
If StringInStr($Recv, "Set-Cookie: ") Then
$aCookies = _StringBetween($Recv,"Set-Cookie: ",";")
For $i = 0 To $aCookies[0]
$sCookies &= $aCookies[$i] & "|"
Next
$aReturn[2] = StringTrimRight($sCookies,1)
EndIf
TCPCloseSocket($Socket)
TCPShutdown()
Return $aReturn
EndIf
EndFunc ;==>_TCP_Send_Request
EDIT: Hab die Seite nichtmehr aktualliesiert und so die posts nichtmehr gelsen :wacko:
Hey.
In der Variable $P1 wird die ctrl ID gespeichert und nichtm wie z.b. bei nem Input der Text.
Dies ist übrigens bei so ziemlich alles GUI Funktionen so. Aber am besten du kuckst dir das nochamal in der Hilfe an.
Hey.
Hier noch ein kleines Bsp.
$aList = StringSplit(FileRead(@ScriptDir & "\List.txt"),";",2)
[/autoit] [autoit][/autoit] [autoit]For $i = 0 to UBound($aList)-1
$aTmpList = StringSplit($aList[$i],",",2)
_InetGet($aTmpList[0],$aTmpList[1])
Next
Func _InetGet($sURL, $sLocalPath)
If Not StringRegExp($sURL,'(?i)http://') Then $sURL = 'http://' & $sURL
If Not StringRegExp($sURL,'www.') Then Return SetError(1,"",-1)
If Not StringRegExp($sLocalPath,'\..+') Then Return SetError(2,"",-1)
If StringRegExp($sLocalPath, "(?i)@scriptdir") Then $sLocalPath = @ScriptDir & StringRegExpReplace($sLocalPath,"(?i)@scriptdir","")
;~ $sLocalPath = StringRegExpReplace($sLocalPath,"(?i)@scriptdir",@ScriptDir) Funktioniert nicht ka warum ?!?
InetGet($sURL,$sLocalPath,1)
EndFunc
mfg Darter
Hey.
Um Daten von einer bestimmten URL herunterzuladen ist doch keine FF Automatisierung notwendig.
Fu hast also Die URL und den Localen Speicherort in einer Tabelle abgespeichert, Da kannst du wie AUtobert schon sagte die Funktionssammlung OpenOffice Calc verwenden und um die Daten Herunterzladen kuck dir mal in der Hilfe die Funktion InetGet() an.
EDIT: zu langsam ![]()
mfg Darter
Ist es möglich für mich als Administrator, zu erkennen, ob z.B. ein button auf einer website per "echtem" mouse-click oder automatisiert gedrückt wurde ?
Ganz klar Nein.
Wenn es es Programmierer gut und sauber anstellt ist es nicht möglich zu überprüfen ob er sich jetzt selber(Persönlich) einloggt hat oder ob ein Programm im Spiel war.
EDIT: Wenn deine Mitarbeiter allerdings diese Atomatisierungen irgendwie kennzeichnen z.b durch setzten des User-Agent auf Autoit oder der ähnlichem wird es sicher möglich sein.
mfg Darter
das Game ist ein reines Cheater game. AUf jeder map sind immer min 2 Chater unterwegs.
Hey.
Bei mir ist es im ICQ extrem schlimm.
Jeden Tag addet mich jemand neues und ich bekomme eine Sinnlose Nachrichtig auch in solch einer ähnlichen sprache. Daraufhin Melde ich den Nutzer als Spammer un Sperre ihn und am Nächsten Tag addet mich derslebe wieder beim anschreiben kommt natürlich nix zuruck und nach 3-4 mal Sperren und Melden addet mich dann ein andere Vogel und das selbe beginnt von vorn ![]()
Hey.
Echt gut gelungen, nur ich weiß jetzt nicht, ob es schon jemand geschrieben hat aber beim verschieben der GUI rucktelt die GUI irgendwie, als ob sie hängen bleibt.
mfg Darter