Register for your free account! | Forgot your password?

You last visited: Today at 01:17

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

Advertisement



Syntax?

Discussion on Syntax? within the AutoIt forum part of the Coders Den category.

Reply
 
Old 02/10/2011, 13:52   #16
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Ok ich habe die Anzahl der Bilder auf 17 runtergesetzt trotzdem erscheint diese Tabelle allerdings geht die nun bis 17???
programm2008 is offline  
Old 02/10/2011, 14:25   #17
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Unverbesserlich... Tabelle → _ArrayDisplay($myPics)
Nimm einfach , dieses kannst du vollständig kopieren.
KDeluxe is offline  
Old 02/10/2011, 17:33   #18
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
danke bro. Der bot ist jetzt vollkommen, allerdings braucht der ja ewig bis er das richtige Bild erkannt hat kann man was dagegen machen??? Gibts vllt auch _ImagesSearchArea ????

$res = _WaitForImagesSearchArea($myPics, $max, 1, $x, $y, 100)
programm2008 is offline  
Old 02/10/2011, 17:47   #19
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Kannst du dein Script mal mit der ImageSearch .au3 und .dll posten (im Anhang). Die _ImageSearch Funktionen hätte man aber auch besser umsetzen können.
KDeluxe is offline  
Old 02/11/2011, 09:12   #20
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
So sieht das fertige Programm aus. Allerdings braucht der bei den 18 Bildern ewig bis er das richtige hat..


PHP Code:
#include <ImageSearch.au3>
#include <Array.au3>
$x 
$y 
0

_okey
()                                                                

Func _okey()
Sleep(1000)    
MouseClick("left",1086,716,2,0)                ;Klick auf Würfel
Sleep
(2000)                                ;2 Sekunden wartenbis Okey geladen ist

$ok 
_imagesearcharea('okey.bmp',1,640,560,771,620,$x,$y,100)        ;Suche nach dem "Okey.Bild" in der Mitte
    
If $ok 1 Then                                                    ;Wenn das Bild gefunden wird dann
        MouseClick
("left",$x,$y,3,0)                                ;Klick aufs "Okey.Bild" und das Programm startet von neuem
        _okey
()
    Else                                                             ;
WICHTIG Wenn Nein dann läuft das Programm weiter
        _losbild
()
    EndIf                                                            ;
Ende der Bedingung
EndFunc

Func _losbild
()
$los _imagesearch('los.bmp',1,$x,$y,100)                            ;Suche nach dem "Los.Bild"
    
If $los 1 Then ;                                                ;Wenn das "Los.Bild" gefunden wird läuft das Programm weiter
        _losfragee
()
    Else                                                             ;
Wenn das "Los.Bild" nicht gefunden wirddann klicke auf die vorgegebenen Koordinaten
        MouseClick
("left",840,442,2,0)
        
MouseClick("left",840,464,2,0)                                ;Klickkoordinate für Frage
        MouseClick
("left",840,450,2,0)                                ;Klickkoordinate für Frage
        MouseClick
("left",840,505,2,0)                                ;Klickkoordinate für Frage
        MouseClick
("left",840,521,2,0)                                ;Klickkoordinate für Frage
        MouseClick
("left",840,609,2,0)
        
MouseClick("left",840,480,2,0)                                ;Klickkoordinate für Frage
        MouseClick
("left",1060,716,2,0)                                ;Klickkoordinate für Okey
        _okey
()
    EndIf
EndFunc
        
Func _losfragee
()
    
$max 18 ;Anzahl der Bilder
Dim $myPics
[$max 1]
For 
$i 0 To $max
    
If $i == 0 Then
        $myPics
[$i] = $max
    
Else
        
$myPics[$i] = $i ".bmp"
    
EndIf
Next

Dim $x
$y 
$res 
_WaitForImagesSearch($myPics$max1$x$y100) ;maximal x Sekunden für x Bilder [B][COLOR="Red"]HIER BRAUCHT DER FAST EINE MINUTE UM DAS RICHTIGE BILD ZU ERKENNEN[/COLOR][/B]
If 
$res 0 Then
    
If $res == 1 Then
        MsgBox
(0,'Los','Los ist nicht vorhanden')
        Exit
    ElseIf 
$res == 12 Then
        MouseClick
("left"84055010)
        
_losrichtig()
    Else
        
MouseClick("left"$x$y10)
        
_losrichtig()
    EndIf
EndIf
EndFunc

Func _losrichtig
()
MouseClick("left",1060,716,1,0)                                ;Klickkoordinate für Okey
Sleep
(1000)                                                    ;Wartet eine Sekunde
MouseClick
("left",629,571,1,0)                                ;Klickkoordinate für Ich-Will-Gewinnen
Sleep
(1000)                                                    ;Wartet eine Sekunde
MouseClick
("left",951,638,1,0)                                ;Klickkoordinate für Teilnehmen
Sleep
(1000)                                                    ;Wartet eine Sekunde
MouseClick
("left",717,610,1,0)                                ;Klickkoordinate für WeiterGehts
Sleep
(1000)                                                    ;Wartet eine Sekunde
_okey
()                                                        ;Das Unterprogramm _okey wird gestartet
EndFunc 
programm2008 is offline  
Old 02/11/2011, 14:36   #21
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Wenn du den Bereich eingrenzen möchtest kannst du die Funktion doch einfach um 4 Parameter erweitern, wo soll das Problem sein? Ist es für ein bestimmtes Fenster?
KDeluxe is offline  
Old 02/12/2011, 17:18   #22
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Ja ist es
programm2008 is offline  
Old 02/12/2011, 17:19   #23
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
WaitForImagesSearchArea gibts doch nicht??
programm2008 is offline  
Old 02/12/2011, 20:08   #24
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Eigentlich schon, du musst nur die Funktionen in der UDF etwas ändern.
KDeluxe is offline  
Old 02/13/2011, 15:51   #25
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
Was heißt UDF ^^
programm2008 is offline  
Old 02/13/2011, 20:37   #26
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
UDF = User Defined Function

In diesem Fall die ImageSearch.au3. Ich persönlich würde die UDF nie benutzen (liegt auch daran, dass ich eigentlich kein AutoIt benutze), da sie mir zu Fehleranfällig wäre.
Ich hab der UDF mal 4 neue Funktionen verpasst, aber ich hatte keine Lust, die UDF komplett zu bearbeiten.

Neue Funktionen:
  • _WaitForImageSearchArea
  • _WaitForImagesSearchArea
  • _WaitForImageSearchWindow
  • _WaitForImagesSearchWindow
  • _ImageSearch bearbeitet

Der Source Code der ImageSearchDLL.dll ist übrigens Open Source. Falls sich jemand dafür interessieren sollte, .
Attached Files
File Type: zip ImageSearch.zip (42.8 KB, 16 views)
KDeluxe is offline  
Old 02/14/2011, 22:34   #27
 
elite*gold: 0
Join Date: Jan 2011
Posts: 20
Received Thanks: 0
KILLER DELUXE DU BIST EINFACH DER BESTE. ICH HOFFE GENAU WIE DU MIR GEHOLFEN HAST WIRD AUCH DIR EINER IN NOT HELFEN
programm2008 is offline  
Reply


Similar Threads Similar Threads
[HELP] C# WPF syntax
12/23/2010 - CO2 Programming - 14 Replies
Does anyone knows how to convert or what's the right syntax on this C# form application syntax? webBrowser1.Document.GetElementById("name&quo t;).SetAttribute("value", textBox2.Text); webBrowser1.Document.GetElementById("message& quot;).SetAttribute("value", textBox1.Text); webBrowser1.Document.GetElementById("sumbit&q uot;).InvokeMember("click"); i'm having error on "GetElementById" :S just confused.
[FRAGE] php Syntax
09/17/2010 - Flyff Private Server - 1 Replies
Hi, könnte mir bitte jemand hier weiterhelfen .Möchte eine Rankingtabelle machen in der die Teammitglieder nicht angezeigt werden so nach der Art : <? require('./configs/reg_conf.php'); mssql_select_db("ACCOUNT_DBF"); if ('m_chLoginAuthority' == F) { echo "wird in Tabelle angezeigt";} else
[Question]Syntax for Pet..
03/22/2010 - EO PServer Hosting - 5 Replies
Hey, You know when you compose on top left it says " So and so have composed so and so." well something like that, Whats the Syntax for the pet? Like the Syntax %user_name = Display of the character name. I need to where i can find it and after 50* where the orange fireworks and the GM broadcast saying "So and so's pet is this many stars congratz" http://i430.photobucket.com/albums/qq23/MikeMadMa n_album/lol-1.jpg Just all smudgy cuz i wanna keep my privacy O_O Thanks.
[HELP]Syntax Error
11/28/2009 - Dekaron Private Server - 1 Replies
I have a problem with syntax can someone help: http://img192.imageshack.us/img192/1248/erro1m.jp g Code: USE ;
Syntax ERROR?!
10/27/2008 - General Coding - 9 Replies
hi, ich wollte an den start meines Script ein HotKeySet einfügen aber wenn ich das mache kommt: Syntax ERROR hier mein Script(beispiel): HotKeySet("{numpad1},"start") MsgBox(0,"titel","text") ich glaub ich bin zu blöd was ist da falsch?...wenn ihr meint da fehlt ein " hab ich schon probiert geht nicht, oder ich hab es an der falschen Stelle eingefügt.



All times are GMT +1. The time now is 01:18.


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.