hello!
i have been using imagesearch for a few days, and i have a question here
F4::
imagesearch, x, y, 0, 0, A_screenwidth, A_screenheight, file.png
; msgbox, %x%, %y%
mouseclick, left, %x%, %y%
return
this is my script and my script can find my picture very well, however my mouse just doesnt click where i want
the cursor always clicks at the left-up corner of the png picture. it just never click right in the middle of the png picture as i want
my question is ... is there any way to solve my problems like adding numbers onto the x and y mouseclick, left, %x%+2, %y%+2 ?
thank you so much for reading my question!!
how to click beside a iamge Topic is solved
-
- Posts: 8
- Joined: 13 Feb 2018, 23:10
- Contact:
Re: how to click beside a iamge Topic is solved
You can try force expression for this command, like this:
If it doesn't work - simply overwrite the variables with your offset before the command:
Code: Select all
mouseclick, left, % x+2, % y+2
Code: Select all
imagesearch, x, y, 0, 0, A_screenwidth, A_screenheight, file.png
x += 2
y += 2
mouseclick, left, %x%, %y%
Use
Code: Select all
[/c] forum tag to share your code.
Click on [b]✔[/b] ([b][i]Accept this answer[/i][/b]) on top-right part of the post if it has answered your question / solved your problem.
Who is online
Users browsing this forum: alawsareps, Joey5, mebelantikjaya, mikeyww and 311 guests