I am trying to click an image (always the same image) in various spots. For some reason, I run the script and absolutely nothing happens! I assume use:
ImageSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ImageFile
Click, %OutputVarX%, %OutputVarY%
OutputVarX/Y would be where it found the image and X1/Y1 are the "upper left" of the box and X2/Y2 are the "lower right". ImageFile is the name of the file with the file path.
Anyone see any issues here?
Thanks!
Click image in random location Topic is solved
Re: Click image in random location
If you are posting exact code, off the top sight i see an error. Should be:
"..., ImageFile.png ;or what ever extention
Edit:
Also could be that the location you are searching has anti macro measures if a game.
"..., ImageFile.png ;or what ever extention
Edit:
Also could be that the location you are searching has anti macro measures if a game.
Re: Click image in random location Topic is solved
The exact script I'm using is:
#+z::
ImageSearch, outx, outy, 4900, 660, 5050, 820, like.jpg
MouseMove %outx%, %outy%
Click
Absolutely nothing. :/ The reason the x coords are so high is because it's on a second monitor by the way.
Thanks!
#+z::
ImageSearch, outx, outy, 4900, 660, 5050, 820, like.jpg
MouseMove %outx%, %outy%
Click
Absolutely nothing. :/ The reason the x coords are so high is because it's on a second monitor by the way.
Thanks!
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: Click image in random location
If there's any variance between the image on the screen and the image file, it won't work. Meaning, if you compressed the image, it will have variation and won't work. You should always use uncompressed images (png). You may also try setting the variation parameter for ImageSearch.
Re: Click image in random location
'sigh' Still nothing. Here's the updated script:
CoordMode Pixel
CoordMode Mouse
ImageSearch, outx, outy, 1100, 640, 1160, 830, like.png *50
MouseMove %outx%, %outy%
Thanks!
CoordMode Pixel
CoordMode Mouse
ImageSearch, outx, outy, 1100, 640, 1160, 830, like.png *50
MouseMove %outx%, %outy%
Thanks!
Re: Click image in random location
Try some diagnostics with MsgBox % ErrorLevel and see what the ImageSearch command is setting the error to. Also, double check your CoordMode; the default is Screen and you were talking about having such a high X value before.
Re: Click image in random location
To use variance it should be like this:
Code: Select all
ImageSearch, outx, outy, 1100, 640, 1160, 830, *50 like.png
Who is online
Users browsing this forum: doodles333 and 316 guests