dringen hilfe zu imagesearch

07/27/2010 14:34 testcheater#1
Hi ich habe mir auch die imagesearch demo angesehen werde aber nicht schlau^^.
Also ich habe diesen code:

PHP Code:
#include <ImageSearch.au3>

;
Demo on the functions of ImageSearch
Assumes that you have a Recycle Bin icon at the top left of your screen
Assumes that you have IE6 or 7 icon visible
Please make the icon visible or we won't be able to find it
;

MsgBox(0,"MSG","You need to have the should have recycle bin, and preferably, an IE icon, a PDF icon and folder icon for the demo to go nicely. All of them should be visible on the desktop")

$x1=0
$y1=0



; find recycle bin and move to the center of it
$result = _ImageSearch("exit_default.png",0,$x1,$y1,0)
if $result=1 Then
    MouseMove($x1,$y1,3)
    MsgBox(1,"Found","Found a empty recycle bin here... cursor move to top left of image")
    
EndIf 
habe das bild exit_default.png sichtbar aufm desktop. doch imemr kommt die meldung:
"You need to have the should have recycle bin, and preferably, an IE icon, a PDF icon and folder icon for the demo to go nicely. All of them should be visible on the desktop")
(ich habe ein anderes bild genommen als die die dort stehen dürft aber doch kein problem sein.)

Und wie kann ich es machen das wenn das bild exit_default.png wenn es das in einem spiel findet das er dann den script einfach stoppt?

Danke euch schonmal.
07/27/2010 14:51 bladerofdarknes#2
auf autoitbot DE gibts genügend beispiele schau da mal nach
und: You need to have the should have recycle bin, and preferably, an IE icon, a PDF icon and folder icon for the demo to go nicely. All of them should be visible on the desktop

die logik von dem satz versteh ich nicht.
07/27/2010 14:53 omer36#3
PHP Code:
#include <ImageSearch.au3>

MsgBox(0,"info","Script wird gestartet"1)

$x1=0
$y1
=0

$result 
_ImageSearch("exit_default.png",1,$x1,$y1,0)
if 
$result=1 Then
Exit
EndIf

While 
1
    Sleep
(100)
WEnd 
oder was meinste?

€und das die msgbox kommt ist doch normal, wenn du es in deine source mitkopierst?
07/27/2010 15:01 testcheater#4
Quote:
Originally Posted by omer36 View Post
PHP Code:
#include <ImageSearch.au3>

MsgBox(0,"info","Script wird gestartet"1)

$x1=0
$y1
=0

$result 
_ImageSearch("exit_default.png",1,$x1,$y1,0)
if 
$result=1 Then
Exit
EndIf

While 
1
    Sleep
(100)
WEnd 
oder was meinste?

€und das die msgbox kommt ist doch normal, wenn du es in deine source mitkopierst?

nein da kommt dann das:
Code:
>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\heigi\Desktop\ffff.au3"    
C:\Program Files (x86)\AutoIt3\Include\ImageSearch.au3 (40) : ==> Subscript used with non-Array variable.:
if $result[0]="0" then return 0
if $result^ ERROR
07/27/2010 15:27 omer36#5
versuchs mal so:

PHP Code:
#include <ImageSearch.au3>

$x1=0
$y1
=0

While 1
$result 
_ImageSearch("exit_default.png",1,$x1,$y1,0)
if 
$result=1 Then
    MsgBox
("","Info","script wird beendet!","1")
    
Sleep(100)
    Exit
EndIf
WEnd 
07/27/2010 15:43 testcheater#6
kommt wieder das:


>"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\heigi\Desktop\ffff.au3"
C:\Program Files (x86)\AutoIt3\Include\ImageSearch.au3 (40) : ==> Subscript used with non-Array variable.:
if $result[0]="0" then return 0
if $result^ ERROR
>Exit code: 1 Tim
07/27/2010 15:48 omer36#7
hää bei mir kommt kein fehler o.O

hast du auch die ImageSearch.au3 in den Includes ordner gelegt?
07/27/2010 16:08 testcheater#8
C:\Program Files (x86)\AutoIt3\Include\ImageSearch.au3
07/29/2010 09:39 lczocker#9
Hast du die ImageSearchDLL.dll in dem Skript verzeichnis?

Es könnte eventuell daran liegen.