Image Search and if found send key if not, continuous searching until find

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Lucaojj
Posts: 2
Joined: 24 Feb 2022, 13:33

Image Search and if found send key if not, continuous searching until find

24 Feb 2022, 13:52

i want a script to send the key (E) after this will search a image on the screen until find, if don't find continuous searching until find and when find, send E again. Someone can help please?
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Image Search and if found send key if not, continuous searching until find

24 Feb 2022, 14:07

Hello!
I think you may be capable to do that by your own.
You'll need this command: Send
... and this: ImageSearch.
Here you may find a lot of topics related to ImageSearch implementation: https://www.google.com/search?q=ImageSearch+site%3AAutoHotkey.com
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
Lucaojj
Posts: 2
Joined: 24 Feb 2022, 13:33

Re: Image Search and if found send key if not, continuous searching until find

24 Feb 2022, 14:09

i tried to did some like this

Code: Select all

Send, e
sleep 1000
ImageSearch, FoundX, FoundY, 0, 0, %1600%, %900%, *20 C:\autohotk\a.bmp
    if !ErrorLevel
    {
        Send, e
    }
    Sleep 100
Esc::ExitApp
[Mod edit: [code][/code] tags added.]

but isnt work
i want to still looking for the imagem until find
Last edited by Lucaojj on 24 Feb 2022, 14:28, edited 1 time in total.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Image Search and if found send key if not, continuous searching until find

24 Feb 2022, 14:28

Try to run this. What do you see?

Code: Select all

 MsgBox, %1600%
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.
amateur+
Posts: 655
Joined: 09 Oct 2021, 15:43

Re: Image Search and if found send key if not, continuous searching until find

24 Feb 2022, 14:42

Once you solve this issue, take a look at this command: Loop.
Have found any drawback in my code or approach? Please, point it out. /The moderator ordered to remove the rest of the signature, I had obeyed.
And I really apologize for our russian president. Being a citizen of an aggressor country is very shameful. Personally I tried to avoid this trying to defend elections from fraud being a member of the election commission of one of the precincts but only was subjected to a hooligan attack and right before the vote count was illegally escorted from the polling station and spent the night behind bars (in jail) in a result of illegal actions of corrupt policemen.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: shipaddicted and 61 guests