Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 16:11

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

Advertisement



Noob needing help on _Imagesearch

Discussion on Noob needing help on _Imagesearch within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 7
Received Thanks: 0
Noob needing help on _Imagesearch

So i was starting to build a bot for a work on autoit, and i only made this to check if it detects when firefox is opened or not, and it does not work!

Code:
#include <ImageSearch.au3>
$TimeTolerance = 0
$FFOpenPath = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
$x = 0
$y = 0

ShellExecute($FFOpenPath)
Do
   $search = _ImageSearch('FFOpened.bmp', 0, $x, $y, 0)
   If $search = 1 Then
	  MsgBox(0,"ImageSearch","It worked!")
	  ExitLoop()
   ElseIf $search = 0 Then
      MsgBox(0,"ImageSearch","Can't find image!")
      Sleep(5000)
      $TimeTolerance = $TimeTolerance + 1
   EndIf
Until $TimeTolerance = 3
It does not show neither msg box for "Cant find image" or "It worked!"
The bot simply runs firefox and does nothing more

Can you help me?

Thanks
Kardu is offline  
Old 07/24/2014, 04:55   #2
 
elite*gold: 0
Join Date: Jul 2014
Posts: 14
Received Thanks: 0


The person has a download link for image search that might help you more.
Purge75 is offline  
Old 07/24/2014, 13:51   #3
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Why use ImageSearch for that?
Either use ProcessExists or WinExists.
alpines is offline  
Old 07/24/2014, 16:16   #4
 
elite*gold: 0
Join Date: Sep 2009
Posts: 7
Received Thanks: 0
Quote:
Originally Posted by Purge75 View Post


The person has a download link for image search that might help you more.
Is that download link working for you? It shows up as unavailable web page here.

Quote:
Originally Posted by alpines View Post
Why use ImageSearch for that?
Either use ProcessExists or WinExists.
Yeah i think it would be the same thing in this case, but i'll need ImageSearch in other parts of this script for sure..
Kardu is offline  
Old 07/25/2014, 01:55   #5
 
elite*gold: 0
Join Date: Jul 2014
Posts: 14
Received Thanks: 0
its on page 4
link below that works

Purge75 is offline  
Old 07/26/2014, 03:58   #6

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
You don't get any error? For example I forgot to put the Imagesearch.dll in the same folder as the script
Moneypulation is offline  
Old 07/27/2014, 22:42   #7
 
smsalbania's Avatar
 
elite*gold: 0
Join Date: Dec 2011
Posts: 51
Received Thanks: 7
Try this

If you want to search image:

Code:
Local $search1 = _ImageSearch("imghere.png", 0, $x, $y, 0) ; don't forget to change image ;)
If $search1 = 1 Then
Msgbox(64, "Hell yeah", "I found it!")
Else
Msgbox(64, "Oh no", "I haven't found it!")
Endif
If you want to se if window is active:

Code:
$win = "Untitled" ;don't forget to change the window
If WinActive($win) Then
    MsgBox(64, "Hell yeah", "I found the active window and it is: " & $win &" .")
 Else
	 Msgbox(64, "Oh no", "I haven't found it!")
EndIf
Try this..
smsalbania is offline  
Reply


Similar Threads Similar Threads
needing cps crystal server needing a decent amount
06/01/2014 - Conquer Online 2 Trading - 1 Replies
need asap!
Noob Needing Help
11/25/2013 - Last Chaos - 2 Replies
So...I'm looking to make my own private server for just myself. Most of the tutorials I found have pieces that don't work anymore or don't make any sense. If anyone could post how to make a private server that would be greatly appreciated! Thank you for your time.
Noob Needing Help
11/17/2013 - Last Chaos Private Server - 0 Replies
So...I'm looking to make my own private server for just myself. Most of the tutorials I found have pieces that don't work anymore or don't make any sense. If anyone could post how to make a private server that would be greatly appreciated! Thank you for your time.
nOOb needing a little help
12/25/2009 - Lineage 2 - 3 Replies
So my friend talked me into trying this out and it seems like it will be helpful but i am a bit lost and am hoping someone might be able to help me out or guide me to the right links. So i have looked over the guide on how to use el2walker and have DL 2.11 for Gracia Live but i can't seem to get it to work. i launch it and as soon as L2 opens it shuts down. I was wondering if there is a tutorial anyone can point me to for how to set it up prior to launching the game and if there is...
noob needing help
08/30/2006 - Conquer Online 2 - 2 Replies
i am a bog noob with computers an conquer an bots an macros can some one send me a virson an the muti client an explain to me in english (not all that other crap that the other muti clients ppl say) plzzzzzzzzzzz



All times are GMT +1. The time now is 16:12.


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.