How to Automate Clicking an image with AutoHotkey

Поделиться
HTML-код
  • Опубликовано: 2 янв 2025

Комментарии • 101

  • @JoeGlines-Automator
    @JoeGlines-Automator  4 года назад +1

    Are you *new to AutoHotkey* and want to learn amazing *tips* & *tricks* ? Check this out: www.the-automator.com/Intro

    • @laigrimmie6610
      @laigrimmie6610 2 года назад

      hi sir joe where did u get tha capture picture or snipping tool.. to capture your icons

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      @@laigrimmie6610 Well I use my Window Snipping tool a lot however it isn't for icons. for Icons I either use HellBent's Quick icon maker the-Automator.com/QuickIconsv2 or irfanview (a free program that can rip the icons from programs.
      My window snipping tool is the-Automator.com/Snip

    • @laigrimmie6610
      @laigrimmie6610 2 года назад +1

      @@JoeGlines-Automator thanks for the reply buddy i appreciate..

  • @pdppdp3854
    @pdppdp3854 2 года назад

    Hi, Joe i searched for that script on the forums... lo and behold i saw your youtube video.. demonstrating this very useful script!! awesome stuff!!

  • @kangrupabsi8649
    @kangrupabsi8649 4 года назад

    I've been combing through your tutorials and you're a wizard. Thank you sir.

  • @gdog8170
    @gdog8170 Год назад

    1:34 Here I really don't know what you did. Where did you get this script from? Is it a new one? How do I make it apply into the script that you made like you did? I am confused

  • @garyschasteen9440
    @garyschasteen9440 6 лет назад +2

    This is really cool! Thank you so much for the tutorial, and for making the code available!

  • @minkziibuby
    @minkziibuby 2 года назад +2

    Thanks Joe, its really useful and worked!

  • @cIeetz
    @cIeetz Год назад +1

    ahk website is it just me or they make it stupid hard to learn by just reading the forum. the example is so simple and doesnt break it down. i always have to go to youtube

  • @mdproForPC
    @mdproForPC 6 лет назад +1

    ok i want it to search for image 1 then click i did that but
    can i get it to search for image 2 then click then image 3 and click and wait for image 1 to show? and start again

    • @BellyBacon
      @BellyBacon 5 лет назад

      did you find out? i need to know that, too.

  • @troller4jesus
    @troller4jesus 2 года назад

    Is there a way to just do any action you want if image exists rather than clicking the image? Like if I detect an image then shutdown my computer

  • @patrickschardt7724
    @patrickschardt7724 2 года назад

    it seems the file FindText.ahk has the custom functions for left clicking, right clicking, etc but not the F12 hotkey. The file FindText_GetText_JG.ahk has the F12 hotkey and a lot of other things but not the custom functions for use with the hot strings. Which file should I use?

  • @EugeS123
    @EugeS123 2 года назад

    Hi, great Video.
    is it possible to search and double click multiple images/text lines in one go?
    And can it be set up to scroll throw a window and search for all text lines?
    For Context i have a long List, with like 400 text lines / keywords and i need to select some of them with double click. (Its too long for one window size, thats why i need to scroll through it)
    Should i use V1 or V2 for this?

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      In programming virtually anything is "possible". The difficulty is every situation is different and what you're describing sounds like it needs customization. You can try and join our Free Friday calls if you don't mind your screen shared on RUclips the-Automator.com/Fridays Otherwise we do have paid consulations the-Automator.com/Consult

  • @raghavadoregowda2191
    @raghavadoregowda2191 Год назад

    Joe, what are the names of the x and y coordinates in this findtext function where the image was found? I want to use controlclick x, y and not "find text" click due to technical reasons

    • @JoeGlines-Automator
      @JoeGlines-Automator  Год назад

      If you want to use control click, you should look at AutomateMyTask . That's the default behavior.

  • @Rynzos
    @Rynzos 5 лет назад +1

    is it also possible that the program waits until the image appears on screen and then clicks it? the image will appear at a random time

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад +2

      You would just put the searching in a loop and detect when it exists

    • @Rynzos
      @Rynzos 5 лет назад

      @@JoeGlines-Automator thx for the quick response ! How can i do that ?

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад

      @@Rynzos Something like what I did here the-automator.com/automating-unfriending-on-facebook/

    • @wevertonoliveira7671
      @wevertonoliveira7671 3 года назад

      I can try loop to choose a right option according to the text with each image?

  • @1dolan170
    @1dolan170 4 года назад +1

    Hi Joe, I have a question, can this script detect text on screen and write that text on other side (automatically)? like a microsoft word page or a text box (like youtube's search box)?

    • @JoeGlines-Automator
      @JoeGlines-Automator  4 года назад

      This program does not do OCR, it just finds and image / pixel grouping. my most recent screen clipping tool has OCR built into it which you could automate having it be sent to Ms word

  • @sluggy6074
    @sluggy6074 Год назад

    Is "MoveBack:=" an actual thing? I can't find it anywhere on the forums or anything. This is the only place ive ever seen that and it def doesnt work for any of my scripts

    • @JoeGlines-Automator
      @JoeGlines-Automator  Год назад

      It's an actual thing inside my function. You need to learn how to use functions if you're going to use this

    • @sluggy6074
      @sluggy6074 Год назад

      @@JoeGlines-Automator
      Looks like I've got a ways to go then. Thanks for clarifying this. Good work on your videos you really know your stuff

  • @xr4nchy
    @xr4nchy 3 года назад

    There are two results when I run the script, how do I perform actions on each of the result found ??

    • @JoeGlines-Automator
      @JoeGlines-Automator  3 года назад

      Just call them separately changing the index you're clicking on

  • @theriddler8375
    @theriddler8375 2 года назад

    what is the editor you use?

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      The editor featured in this video is SciTE4AutoHotkey the-Automator.com/SciTE
      However this is an old video. I crecommend going here and looking at stats/watching the video www.the-automator.com/best-autohotkey-editors-ides/

  • @muonline2067
    @muonline2067 5 лет назад +1

    thank you so much bro, please answer me Can we change a size of the rectangular using for capturing objects? if, yes could you tell me please

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад

      Yes, I'm not in front of the computer right now but it isn't that hard to find. Look for four numbers separated by commas. If you find them, create a backup if to he e values and then change what is there

    • @muonline2067
      @muonline2067 5 лет назад

      @@JoeGlines-Automator thank you so much for your answer. I will try to find them right now

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад

      @@muonline2067 Sorry, I was wrong. IT is just two numbers. On my script ti is line 64. Search for this in the script: The capture range can be changed by adjusting the numbers

    • @muonline2067
      @muonline2067 5 лет назад

      Thank you so much, I have already found them,. They are ww and hh variables. and I have another question please answer me when you could. The errors to find the text is a little strange for me, I changed them a little bit and they gave me 100% a different object which is searched. Can you explain a little bit about this?

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад

      @@muonline2067 Sorry, I'm not understanding your question. Honestly I've never had a case where it was not able to find the image... I just check to see if "ok" is an object.

  • @mustaphaboudaoud9643
    @mustaphaboudaoud9643 2 года назад

    I want this to send a hotkey when it finds it instead of sending mouse click how I do that

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад +1

      First off- you don't "send" a hotkey. YOu're probably wanting to send a key combination. In that case you'll probably use the Send command. Look it up in the AutoHotkey documentation

  • @johbuldmann0206
    @johbuldmann0206 7 лет назад

    Hello, just found your awesome channel! really appreciating all the Autohotkey content. i have just one question, the autocompletion at for example 3:46 "ftrc", are all of these self written/defined autocompletion like "::ftrc::FindText_Right..."?
    best regards from Germany, will watch lots more!! Johannes

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад

      Well they all have to be defined at some point. I have a file that is ~4,000 words which is a "spell check" which I didn't write but, yes, there are no "built-in" ones

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад +1

      I just realized what video this was tied to. Yes, the text replacement is a HotString which you can see in my other videos

  • @wevertonoliveira7671
    @wevertonoliveira7671 3 года назад

    i can try loop to choose a right option according to the text with each image appear on web screen and click ?

    • @JoeGlines-Automator
      @JoeGlines-Automator  3 года назад +1

      Yes. Just use AutomateMyTask For finding an image and clicking. , do the looping in AutoHotkey code

    • @wevertonoliveira7671
      @wevertonoliveira7671 3 года назад

      @@JoeGlines-Automator Thanks for responding, is AutomateMytask another program? To make donations to the channel can I use the description link?

  • @KidNapPingNo1
    @KidNapPingNo1 7 лет назад +1

    Did you download some library for AHK? I'm trying to get started with AHK but everytime I write a script and use some object/function/method (I don't know how to call it exactly) it says "Error: This line does not contain a recognized action." E.g. ImageSearch.
    btw nice videos they are really interesting and well made :)

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад +1

      Check out the 5th video on this page: the-automator.com/autohotkey/autohotkey-functions/ it shows how you can use #Include commands as well as putting them in your library. On this page you can find a reference to my version of the findText function the-automator.com/find-and-click-image-send-text-to-it/

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад

      I had put the findtext() function in my default library so I didn't need to use the #Include command.

    • @KidNapPingNo1
      @KidNapPingNo1 7 лет назад

      yes cause findtext() is a selfmade function, but the ImageSearch e.g. is even included in helpfile of AHK, that's why I dont get why it doesn't work. Maybe I installed AHK it wrong? I think I didn't install it at all. I just unziped the file which I downloaded from autohotkey.com and started scripting :/ I'm rly confused

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад

      oh- sorry, I didn't realized you were asking about ImageSearch (I think of them as the same concept). I don't use ImageSearch but, if it is a built in command, you are correct in that you don't need to reference it. Did you strip out everything else out of your script to make sure it was the issue? You can write me directly at Joe@the-Automator.com and I will review...

    • @KidNapPingNo1
      @KidNapPingNo1 7 лет назад +1

      Unfortunately I deleted the old script out of frustration. I reinstalled ahk and installed SciTE4AutoHotkey and now it works. but thanks for your offer and fast answers :)

  • @d_arashi
    @d_arashi 2 года назад

    Hi, congratulations for the video, I wanted to ask you a question since you are a master at what you do, do you think it is possible to click a specific position of a window, even if it is minimized? I would like to press a specific key and that key pretends to press the left mouse button to apply a check to a specific program

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      I don't understand the question. if a window is "minimized" it doesn't actually exist. Windows doesn't track it (to free up memory) so you probalby can't do anything with positions.

  • @sametakbeyaz5021
    @sametakbeyaz5021 3 года назад

    hello can you help me The script I want to make is locked to the selected photo when I right click and hold the mouse, and it will be fixed on the photo. can you write this script code to me :)

    • @sametakbeyaz5021
      @sametakbeyaz5021 3 года назад

      and let it be in a continuous loop

    • @JoeGlines-Automator
      @JoeGlines-Automator  3 года назад

      Sorry, I don't write scripts for people. I teach people how to do the work themselves. If you want someone to write something for you I recommend trying the Facebook group facebook.com/groups/AHK.Automation or AutoHotkey forum

  • @joelatter5185
    @joelatter5185 4 года назад

    Hey Joe!
    Is there a way to find and click an image on my other monitor. The ImageSearch/FindText functions work on my primary monitor but not my other monitor.
    Thanks for your videos!

    • @JoeGlines-Automator
      @JoeGlines-Automator  4 года назад

      Hi Joe, I'd consider using FindText() You can see an example how I use it here: the-automator.com/find-and-click-image-send-text-to-it/ Just note that the version I use in that example isn't the most current one. Having said that, I do believe you can force ImageSearch to search across all windows. I don't know how as I don't use it but I'll bet searching the forum will lend something.

  • @bethanybenett6463
    @bethanybenett6463 3 года назад +1

    Thank you so much !! your videos are so helpful!!
    Btw, Can I send text once the image found and delay for a few seconds then send enter key?
    and How can I do that...
    ;~ SendInput , %Text%
    SendInput , ^v
    Sleep 5000
    if (Enter=1)
    SendInput , {Enter}
    if (Move_Back){
    Sleep, 30
    MouseMove, %Orig_X%,%Orig_Y%
    }
    }
    Am I correct? Please let me know

    • @JoeGlines-Automator
      @JoeGlines-Automator  3 года назад +1

      I don't use FindText any more. I use Automate my Task : the-automator.com/AmT

    • @bethanybenett6463
      @bethanybenett6463 3 года назад

      @@JoeGlines-Automator awesome! Tysm

  • @TheRickyrobot
    @TheRickyrobot 7 лет назад +1

    Great video like always!! maybe in the next tutorial you can show me how to make a loop that will search for multiple?

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад

      I'm pretty swamped right now. I did see some posts on the forum how to use it, have you looked there? Here it has been updated in 5.3 to accommodate multiple images autohotkey.com/boards/viewtopic.php?f=6&t=17834&p=173210&hilit=multiple#p173210

    • @TheRickyrobot
      @TheRickyrobot 7 лет назад +1

      Thnx man! I found it.
      Another Question: Do you think It's possible to make a GUI that provides the STRING ( image ) ?
      or is there something Im not aware of?
      I'm having this Idea for a sweet piece of software where you can activate multiple searches with checkboxes and the Strings placed in Editboxes.
      If you know what i mean ^^

    • @JoeGlines-Automator
      @JoeGlines-Automator  7 лет назад

      I haven't studied that part of the code but, since it is shown in the tool, the text of the string should be available from within the function. You'd just have to pipe that to a gui...

  • @PNWcrypto
    @PNWcrypto 6 лет назад

    I'm having issues with the hotstrings not populating. Any ideas?

    • @PNWcrypto
      @PNWcrypto 6 лет назад

      Also, your version of 'FindText' is saved in my AutoHotKey folder but will not open with my Scite4. Any ideas why? feiyue's opens though for some reason

    • @JoeGlines-Automator
      @JoeGlines-Automator  6 лет назад

      Well I'd need to no more about it. Do they work in some programs and not others? Try and launch the script as an admin and see if that fixes things. You can also change the Send Mode autohotkey.com/docs/commands/SendMode.htm

    • @PNWcrypto
      @PNWcrypto 6 лет назад

      @Joe Glines It's been sorted out my friend! Thanks for all the info! Day 4 of AHK and between yourself and Hellbent I've completed my first decent script. Only 400 lines but it's still going to save me tons of effort!
      -Do you have any info or videos on Frame.# index/name/id ?
      I also have Discord and an AutoHotKey forum account if that's easier than YT comments

    • @JoeGlines-Automator
      @JoeGlines-Automator  6 лет назад

      This post talks about frames the-automator.com/web-scraping-with-autohotkey-104-frames/

    • @JoeGlines-Automator
      @JoeGlines-Automator  6 лет назад

      I don't use Discord. emailing me at Joe@the-Automator.com is easiest

  • @maharockofficial
    @maharockofficial 4 года назад

    why my cursor is not moving?

  • @ismailariff8951
    @ismailariff8951 2 года назад

    ImageSearch, x, y, 0, 0, 1920, 1080, *50 C:\Users\gac3689\Pictures\AHK\AHK.png
    if ErrorLevel = 0
    {
    Click, (%x%), %y%
    Sleep, 100
    Click, %x%, %y%
    }
    return
    Need your help on this, how to make it click on the center of the image? because right now it only click on left top corner...

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      Just do some math... I don't use ImageSearch. I'd use AutomateMyTask instead the-automator.com/AmT

    • @JoeGlines-Automator
      @JoeGlines-Automator  2 года назад

      Just do some math. offset the x/y . Or use a tool like FindText or AutomateMyTask the-automator.com/AmT

  • @BellyBacon
    @BellyBacon 5 лет назад

    Is there an option to get this working?
    start
    if i find img1 than click it and try to find img2 and click it too
    if img1 not found, goto start
    if img2 not found, goto start
    Everything works fine except for the 2nd image(barrel). Even the img is there, the script wont find it. And yes i tested it, it finds the 2nd image if i start searching the 2nd image first.
    i dont have any clue where to start.
    pastebin.com/ibLrryNp

    • @JoeGlines-Automator
      @JoeGlines-Automator  5 лет назад

      Take a look at the newer version of the function on the AutoHotkey forum. I think they incorporated this. You could simply do what you want by adding logic to your original one using an or statement.

  • @farhidjalali
    @farhidjalali Год назад

    Learning to work with the software to automatically click on images.Learning to work with the software to automatically click on images

  • @Redsloth55
    @Redsloth55 7 лет назад +1

    Link to vid goes to edit video feature