Jump to content

Recommended Posts

Posted (edited)

Hello all

Sorry my last forum was not appropriate due to the autoit rules so this time i will ask for general help that i need with imagesearch. Below is my script which is pretty simple.

 


#include <ImageSearch.au3>
HotKeySet('S', '_Start')

$X = 0
$Y = 0

Func _Start()
Do
  $Search = _ImageSearch('snorlax.bmp', 0, $X, $Y, 0)
Until $Search = 1
MouseMove($X, $Y, 10)
EndFunc

While 1
    Sleep(100)
WEnd

 

I took a print screen of my desktop and cropped the recycle bin icon and saved it as bmp in the script folder and then run the script and it worked. When i press the hotkeythe mouse moved to the place of the icon. However when i try the same with any image that i got from the browser by print screen (done it on several different images) and then save as bmp and run the script, the script does nothing. Maybe i need to include a specific code for imagesearch to detect broswer images because whenver i run the script i make sure the image the script is searching for is visible on the desktop. Thank you all for taking your time to read this post and any help will be appreciated. I have also attached the imagesearch.au3 incase anything is wrong with that.

ImageSearch.au3

Edited by MahM
  • Moderators
Posted

@MahM you obviously did not read the Forum Rules to which you were linked that closely - particularly the bit about Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above.

Do not post this question again.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...