Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 02:59

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

Advertisement



ImageSearch Problem

Discussion on ImageSearch Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Rolle's Avatar
 
elite*gold: 22
Join Date: Dec 2005
Posts: 416
Received Thanks: 72
ImageSearch Problem

Huhu Leute, habe nen echt verzwicktes ImageSearch Problem...
Ich versuche nachdem ich nen Button gedrückt habe ein Funktion zu callen, was auch funktioniert, hier die Function:
Code:
$y = 0
$x = 0
Func _Agni()
   Sleep(1000)	
$agni2 = _ImageSearch("Gods\Agni.bmp",1,$y,$x,0)
   If $agni2=1 Then 
	  MouseMove($y,$x,1)
	  MouseClick("left")
	  MouseClick("left")
		 Sleep(1250)
		 MsgBox(1,"found","found")
   
   ElseIf = MsgBox(1,"test","test")
	  EndIf
EndFunc
Nun bekomm ich immer die "test" MsgBox ausgegeben selbst wenn ich mir bevor die Function gecallt wird das Agni.bmp anschaue und ich habe kein Plan woran das liegt.

Hier noch mal der Button:

Code:
$agni = GUICtrlCreateButton("agni", 56, 216, 65, 65, BitOR($BS_BITMAP,$WS_GROUP))
GUICtrlSetImage(-1, "Gods\Agni.bmp", -1)

While 1
$nMsg = GUIGetMsg()

if $nMsg = $agni Then		;Agni Button
	  $agni1 = MsgBox (1,"Are you Sure","Are you sure u want to pick Agni?",0)
   Switch $agni1
   Case 1
	  GUICtrlSetImage($choosepic, "Gods\Agni.bmp") 
	  GUICtrlSetState($agni, $GUI_DISABLE)
	  Sleep (1000)
	  MsgBox (0,"Ok Have Fun","Ok, have Fun with Agni",1)
	  Call ("_Agni")
   Case 2
	  MsgBox (0,"Pick another ***","Ok! please pick another ***",0)
   Sleep (1000)
   EndSwitch
EndIf
Hoffe mir kann einer meinen Fehler aufzeigen ^^

Grüße

//EDIT:

Fehler selber gefunden, lag am BMP Format des Bildes. Mit PNG hats geklappt
Rolle is offline  
Reply


Similar Threads Similar Threads
Imagesearch.au3 problem
01/29/2011 - AutoIt - 3 Replies
Hi e*pvp ich hab ein kleines problem mit der _Imagesearch.au3 . Ich hab die au3 datei in \autoit\include getan und die .dll in C:\\Windows\System32 . So nun kommt diese Fehlermeldung in scite ERROR: _ImageSearch(): undefined function. Pls Help MfG
ImageSearch Problem
12/23/2010 - AutoIt - 0 Replies
Hallo, und zwar mein problem ist die Transparenz, was ich finden will ist sowas: Directupload.net - Dkcow6vd6.png Hier dieses "Rough" rausfiltern. Nur ist zwischen den Buchstaben ein Hintergrund. Jetzt hab ich schon versucht das "Rough" mit einem schwarzen Hintergrund zu belegen und das schwarz als transparent angeben. Leider funktioniert das überhaupt nicht. bsp bild:
Problem: ImageSearch
11/22/2010 - AutoIt - 10 Replies
Hallo, ich wollte gerne das ImageSearch (http://www.elitepvpers.com/forum/metin2-guides-tem plates/123505-guide-autoit-imagesearch.html) von AutoIt probieren. Dies ist mein Script: #include <ImageSearch.au3> $x1=0 $y1=0 $result = _ImageSearch("test.png",1,$x1,$y1,0) if $result=1 Then MsgBox(0,"Geklappt!")
Imagesearch problem..
07/16/2010 - AutoIt - 6 Replies
es funzt nicht.. es kommt Error:"Wend" statement with no machting "While" statement Ich hab das Wend und das While im Thread rot angestrichen.. warum funzt es nicht?
Imagesearch Problem
09/18/2009 - GW Bots - 16 Replies
Hi, sorry, dass ich nochmal nerven muss:rolleyes:ich hab mal Imagesearch ausprobiert aber irgendwie klappt das bei mir in Guild Wars nicht...:( Kann mir einer bitte sagen woran das liegt?:confused: #include <ImageSearch.au3> $x1 = 0 $y1 = 0



All times are GMT +1. The time now is 03:00.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.