Jump to content
Sign in to follow this  

find text and click on it

Recommended Posts

hello everyone am new here on the site of the autoit

Well I started programming in the autoit recently and today I have a doubt

I would like is the following:

There is a window on my computer, that window there is some text that I want to move the mouse to it and a click.

someone could help me with this issue?

Share this post

Link to post
Share on other sites

Firstly, before you even start, you need to know what type of window it is, what type of control holds the text.

You can use the window info tool that comes with autoit installation to find out information, but even a little explanation would help.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
Share on other sites

you whont use that text, or just to click on it? In my computer if you whont to click on the text where is "Computer" you can press F4 if you whont to add some new text "CTRL + A" > "and type something like %Programfiles%" > if you whont copy use "CTRL + C"

Send ("#e")  
Sleep (2000)  
Send ("{F4} ^a %Programfiles% {ENTER}")
Edited by borism25

Share this post

Link to post
Share on other sites

Posted Image

see in the image.

is a program that I use here at home, where this note marked ** Patch **

I want to move the mouse to the word ** patch ** and a click,

But the problem is not always the word patch in the same place, sometimes he changes his position, so I'm trying to find the mouse and that the word **Patch** and click on it.

Share this post

Link to post
Share on other sites

strange... you can do it using mouse coordenates, but is better doing with controlclick.

the function MouseClick() will do the job, use the AutoIt window info to find the coord where the text is, maybe you can automate to slide the list to the top, to find the text in the same coords everytime.

But i insist that getting the class and using ControlMouse() is more much easier and practical. that using coords.

Share this post

Link to post
Share on other sites


Not always necessary to "unfreeze" the Window Info tool - depending on how you work with it. :)

If you use the "Finder Tool", the target icon on the right hand side, the Window Info GUI has focus while you test the controls in another GUI. So you get the Info for any control over which you are hovering the "Finder Tool", but as soon as you release the mouse button, the "Finder Tool" returns to its niche and the Info remains frozen. :D

If you do not use the "Finder Tool", then you must unfreeze the Window Info GUI to use it, but you get continually changing Info as the mouse moves about over the active GUI. So you have to copy the relevant Info onto paper as moving your mouse cursor to do anything else changes the information when it passes over another control. ;)

The more experienced coders seem to utilise the "Finder Tool" and pestered Jon to make the Info Tool "frozen" on start - which he kindly did some time ago. I hope all that makes sense. ;)


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...