Register for your free account! | Forgot your password?

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

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

Advertisement



Problem with imagesearch

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

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2014
Posts: 5
Received Thanks: 0
Problem with imagesearch

Hello i found this
Code:
#include <ImageSearch.au3>

Global $x, $y

$prison = _ImageSearch("check.bmp",1,$x,$y,50)
If $prison = 1 then
  MouseClick("right", $x, $y)
Else
   MsgBox(048,"Attention","I didnt found the picture.")
EndIf
And when i run it aplication don't show error so it found picture but don't press on image.
kwejk is offline  
Old 03/14/2015, 13:33   #2
 
Logtetsch's Avatar
 
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
Your if statement is wrong. Use the comparison operators instead of assignment operators!


Code:
If $prison == 1 Then
Logtetsch is offline  
Old 03/14/2015, 16:45   #3
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Actually it is not. Using $integerValue = 1 and $integerValue == 1 does the same in AutoIt.

He could've used something like this too
Code:
If _ImageSearch("check.bmp",1,$x,$y,50) Then MouseClick("right", $x, $y)
alpines is offline  
Old 03/14/2015, 19:54   #4
 
Logtetsch's Avatar
 
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
Well, I remember why I stopped using AutoIT...
B2t: Is it true, that the image is displayed on a seperate window?
Logtetsch is offline  
Old 03/14/2015, 22:40   #5
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Can you tell me more about AutoIT because I've only been using AutoIt for years.
alpines is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
ImageSearch Problem
12/22/2013 - AutoIt - 6 Replies
Servus Leute, ich würde mich echt freuen wenn ihr mir zeigen könntet wo der Fehler ist. Ich kann ihn einfach nicht finden. Er soll einfach nur eine MsgBox anzeigen, wenn er das Bild gefunden hat. #Include <ImageSearch.au3> HotKeySet ("{F6}","_START") Global $y = 0, $x = 0
ImageSearch Problem
07/24/2013 - AutoIt - 4 Replies
Huhu habe jetzt schon viel gegooglet und paar Kollegen gefragt und komme einfach nicht auf die Lösung warum ich bei folgenden Code: http://pastebin.com/ZfsJvi0y Immer diesen Error bekomme: if $result="0" then return 0 if $result^ ERROR >Exit code: 1 Time: 1.117 Kann mir einer sagen warum ich immer diesen Fehler bekomme obwohl gar keine Variable mit $result vorkommt? Grüße
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
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?



All times are GMT +1. The time now is 23:54.


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.