• Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

FindText function and helpers

Here you’ll find my version of the FindText function as well as a couple helper files

  1. The file entitled FindText.ahk is to put in your library
  2. The file entitled FindText_GetText_JG.ahk is the GUI tool to help write your syntax
  3. The file entitled FindText_Get_coordinates.ahk should be put in your library
  4. The file entitled FindText_HotStrings.ahk can be used to help you write your syntax

Updated FindText function- Quickly identify a smaller search area to see speed gains

Updated FindText function- Quickly identify a smaller search area to see speed gains


The key idea of the video is to use a smaller search area in order to improve the speed and efficiency of the FindText function.

  • 00:00 💡 The speaker discusses a new function they created for finding text in a smaller search area, which they find useful.
  • 00:36 🔍 The speaker explains how to use the FindText function to quickly identify a smaller search area for improved speed.
  • 01:07 💡 Convert an image to greyscale and test it.
  • 01:15 💡 The function takes over half a second to find the button due to searching in a large area, so the speaker suggests finding a smaller search area for faster results.
  • 01:47 💡 By specifying a smaller search area, the speed of the FindText function significantly increases.
  • 02:35 🔍 The speaker explains a faster method for identifying and clicking buttons in web scraping by sending the mouse to the desired location.
  • 03:15 🔧 The speaker created a sub routine to incorporate two scripts together, allowing for the use of conflicting hotkeys in different scripts.

Transcriptions to video using FindText

hey it’s drug lines and the other day I mentioned I mean what was I doing I was uh I was playing around with this oh I created a separate script for it I download from the forum basically and then made some minor tweaks to it because I use fine text let me go ahead and launch let me see what I got killing here no it is running there we go so what I did was I incorporated my little finding of the area so first off and if you haven’t seen my other videos I’m using this function it’s a pretty cool function I’m go check them out I’ll
put a link in the description here but basically you come in here and you say hey if you were looking to click something or to go to move your mouse over and then do something with it it can be it could be anything right you can be an image or it can be text it doesn’t matter it’s called fine text but don’t let that throw you so let’s say I wanted to wish I had a button on the page doesn’t matter kry erry so let’s just say I want to I wanted to click that so this here gets the overall area
I’m gonna trim it up some so that’s this is what I wanted to find me and I need to convert it to greyscale and say okay and now I can hit this test button and it’s gonna come back and say oh it look and it took 562 milliseconds to find it and then says the position right so here’s where it is the results is okay just means it actually found it and then once I hit OK it’s gonna move the mouse to it so see there to go so BAM it’s there great it’s awesome but then five minutes that’s over a half a second to
find that and that’s part of its because I have three decently large screens and so it searches everywhere for it right so depending on where it starts it can take a long time so I thought hey you know be great now he they described how you can adjust the area on where it’s searching right and and here it’s going from 368 112 – what is it 150,000 yeah and so that’s a pretty big area on each way but what I want to be able to do so I added this so I can click specify area and then I can come up and say you know
I think it’s gonna be in this region and now on my clipboard see little tooltip so then I can come back in here and replace these first I think it’s four points and now when I test it notice it took I don’t even know what that is right it’s it’s less than a twentieth of a second right so it the speed really increases when you shrink down that area in what I course it still it does all the testing and stuff but um I wanted to be able to because often if you work like I do I have certain programs in certain places
and the button is gonna be you know within a couple millimeters but this way like let’s say with web scraping you’re having trouble clicking a button and it’s not sending it well this way you can literally send your mouse there click it and it’ll activate it or you know opening hitting an open button or say button or whatever right but um sometimes if I’m in a hurry and I don’t need a robust fully fledged comm solution for web scraping or something like that I’ll throw this in there
because it’s really fast for me to do this and so um I cheated a little because I was going to incorporate the two scripts together and so I just have one script to share unfortunately the this fine text script actually uses some of the same hotkeys and I was gonna have to rewrite a bunch of stuff and so I said you know what screw it I’ll I’ll create a sub routine for this so this specify area basically I click this it comes down here and tells it to run this other script in a whole different script
right and that way the the hotkeys to even though they conflict they’re on different scripts and since the second one launches it when it launches it becomes the preferential how the the one that’ll get the focus and so that’s it I just thought I’ll put both of the files on this on the source page here and we’re just links to download them or whatever but um awesome putting those hamburger dangers

Comments are closed.