Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 09:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Problem mit AutoIT Bot :(

Discussion on Problem mit AutoIT Bot :( within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Problem mit AutoIT Bot :(

Hallo Leute,
ich code zurzeit nen Bot für mich selber, was es macht ist egal. Aufjedenfall möchte ich gerne, dass an der Stelle wo der Smiley ist, das Programm von vorne anfängt allerdings kommt noch Code dazu, sodass die While-Schleife glaub ich hier nichts bringt!!!

#include <ImageSearch.au3>
$x = 0
$y = 0

MouseClick("left",1086,716,1,0)
Sleep(2000)

#region Suche nach dem Okey in der Mitte

$ok = _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$ y,100)
If $ok = 1 Then
MouseClick("left",$x,$y,2,0)
ElseIf
EndIf
programm2008 is offline  
Old 02/03/2011, 20:39   #2
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Was hindert dich daran einfach eine While-Schleife zu benutzen?
KDeluxe is offline  
Old 02/03/2011, 20:48   #3
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Warte mal

#include <ImageSearch.au3>
$x = 0
$y = 0


MouseClick("left",1086,716,1,0)
Sleep(2000)

$ok = _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$ y,100)
If $ok = 1 Then
MouseClick("left",$x,$y,2,0)
ElseIf
EndIf
GUCK WENN ICH BIS HIER DIE SCHLEIFE MACHE BLEIBT DIE DANN NICHT HIER HÄNGEN UND GEHT NICHT WEITER????

$los = _imagesearcharea('los.bmp',1,1009,247,1110,326,$x, $y,100)
If $los = 1 Then




#region Array für die Lose

Dim $myPics[10]
$myPics [0] =
$myPics [1] =
$myPics [2] =
$myPics [3] =
$myPics [4] =
$myPics [5] =
$myPics [6] =
$myPics [7] =
$myPics [8] =
$myPics [9] =
$myPics [10] =
$myPics [11] =
$myPics [12] =
$myPics [13] =
$myPics [14] =



$res = _WaitForImagesSearch($myPics,4,1,$x,$y,100)
Switch $res
Case 0
Case 1
Case 2
Case 3
Case 4
Case 5
Case 6
Case 7
Case 8
Case 9
Case 10
Case 11
Case 12
Case 13
Case 14
EndSwitch
programm2008 is offline  
Old 02/04/2011, 14:41   #4
 
.Moskito's Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 827
Received Thanks: 414
Code:
#include <ImageSearch.au3>
$x = 0
$y = 0

While 1
MouseClick("left",1086,716,1,0)
Sleep(2000)

$ok = _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$y,100)
If $ok = 1 Then
	MouseClick("left",$x,$y,2,0)
EndIf

WEnd
So müsste es doch gehen?
.Moskito is offline  
Old 02/05/2011, 16:28   #5
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Schau, das Programm soll so ablaufen:
1. Klickt der auf die Koordinaten (1086,716)
2. Wartet das Programm bisschen.
Danach wird geprüft ob da Bild "okey" erscheint, wenn ja wird draufgeklickt und das programm startet von neu. Wenn nein dann läuft das Programm weiter (das programm ist noch nicht vollständig und es wird code hinzukommen)
programm2008 is offline  
Old 02/05/2011, 17:03   #6
 
omer36's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 2,317
Received Thanks: 1,255
so?
PHP Code:
#include <ImageSearch.au3>
$x 0
$y 
0


_okey
()

Func _okey()
MouseClick("left",1086,716,1,0)
Sleep(2000)
$ok _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$y,100)
If 
$ok 1 Then
MouseClick
("left",$x,$y,2,0)
_okey()
Else
    
_next()
EndIf
EndFunc

Func _next
()
;;
;;
EndFunc 
omer36 is offline  
Thanks
1 User
Old 02/05/2011, 17:14   #7
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
JAAAA MAN DAS HABE ICH GEBRAUCHT DANKE ÖMER DU BIST DER BESTE Ellerine Saglik ömercim

Hätten die Goto einfach gelassen, wär ich viel eher vorangekommen scheiß Goto hater
programm2008 is offline  
Old 02/05/2011, 17:35   #8
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Quote:
Originally Posted by Board rules + Signature rules
Doppelposten oder das Pushen von wirklich veralteten Threads nur zum Spaß wird mit einer Infraction geahndet (einer Warning beim ersten Mal)
Omers Script macht nichts anderes als dieses und hier habe ich eine While Schleife benutzt.
PHP Code:
#include <ImageSearch.au3>
$x 0
$y 
0

While True
    MouseClick
("left",1086,716,1,0)
    
Sleep(2000)
    
$ok _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$y,100)
    If 
$ok 1 Then
        MouseClick
("left",$x,$y,2,0)
    Else
        ;
_next()
    EndIf
WEnd 

Das Beispiel ist einleuchtend.
KDeluxe is offline  
Old 02/05/2011, 19:46   #9
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Hä? Versteh ich nicht. Du hast nur eine While-Schleife eingebaut. Von dem _next() war nicht die leisteste Spur. Und einen Doppelpost hat es nicht gegeben, genauso wenig wie das "pushen" eines veralteten Threads. Wenn 3 Tage alt sind, dann weiß ich auch nicht weiter...
programm2008 is offline  
Old 02/05/2011, 21:46   #10
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Du hast 2 Beiträge nacheinander geschrieben. Adroxxx hat sie nur zusammengefügt, allerdings hat er wohl was vergessen.

Eigentlich sollte es sich von selbst erklären, aber hier noch mal etwas "ausführlicher".
Hier mal 2 simple Möglichkeiten:
oder:
PHP Code:
#include <ImageSearch.au3> 
$x 
$y 


While True 
    MouseClick
("left",1086,716,1,0
    
Sleep(2000
    
$ok _imagesearcharea('okey.bmp',1,640,560,771,620,$x,$y,100
    If 
$ok 1 Then 
        MouseClick
("left",$x,$y,2,0
    Else 
        
MsgBox(0"""Else...")
    EndIf 
WEnd 
KDeluxe is offline  
Reply




All times are GMT +1. The time now is 09:24.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.