hi.
Im asking if someone can give me a script for a keyboard key to right click then search an image that could appear anywhere on the screen (must right click first) and then left click on that image has to be a pretty quick motion to. Thanks if anyone can help.
-Press Keyboard key
which on its own will right click find the target image and then left click on it.
thx
probably simple
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
What image? The image you right clicked on? do you have the base image already?
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
yeah i have it already the image, just need to know how i do it, dont know a gr8 deal about ahk :pcrackint wrote:What image? The image you right clicked on? do you have the base image already?
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
So if i rightclick anywhere on the page it will immediately find an image and hover it and then left click, the left click isnt neccassary i can do that myself but the right click is important for what i needBlackendlyre wrote:yeah i have it already the image, just need to know how i do it, dont know a gr8 deal about ahk :pcrackint wrote:What image? The image you right clicked on? do you have the base image already?
both is a bonus
Re: probably simple
Code: Select all
RButton::
ImageSearch, fX, fY, 0, 0, 1920, 1080, "C:\Users\me\img.png"
If ErrorLevel = 0
Click, %fX%, %fY%
If ErrorLevel
Return
Return
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
I think that looks good, if i want a key to function to do all of it including the right click would it start for examplecrackint wrote:Something like that?Code: Select all
RButton:: ImageSearch, fX, fY, 0, 0, 1920, 1080, "C:\Users\me\img.png" If ErrorLevel = 0 Click, %fX%, %fY% If ErrorLevel Return Return
x:: then everything u typed? because i want a key to right click aswell because i'll need my right click on mouse to not be linked to the script
Re: probably simple
Yes, so...
Code: Select all
F1::
Mouseclick, right
ImageSearch, fX, fY, 0, 0, 1920, 1080, "C:\Users\me\img.png"
If ErrorLevel = 0
Click, %fX%, %fY%
If ErrorLevel
Return
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
Thats it! tyvm works fine.. One little picky thing if i could change it, when i do it and the mouse lowers onto the image it is fast but it looks kinda fake. If i was using it in a game situation because it jumps diagonally down to the picture, anyway i could have it simple lower the mouse in a straight line down to click on it? because atm it doesnt matter if my mouse is directly above it when i press the key, it still falls diagonally I can show what i mean if you want with a GIF or lil video, prob gonna sleep for tonight but tysm for ur help
Re: probably simple
gif/vid would help lad.
-
- Posts: 6
- Joined: 23 Oct 2017, 11:25
Re: probably simple
hey bud have pmed u a gif notice how the mouse flys left on the optioncrackint wrote:gif/vid would help lad.
Who is online
Users browsing this forum: No registered users and 50 guests