timmyc

Search for text in a window and click on it (with limited to no window info)

6 posts in this topic

Hi all,

Firstly thanks for your help.

I am using an autoit script to copy and paste a user name into a search field, the search results often include multiple results however i want to select the one that is the correct user. In the attached example you can see i searched for FRAZERR and it came back with three results, one of which is the user i want to click on. I cannot use a mouse click to select the correct user because the spot i need to click on will change (as multiple results come back). So i wanted to search for text in this window (once it finds the text, then click on it) however when i use the AutoIt Window Info i do not see the text in the visible text and the hidden text tab which makes me think that i cannot search for this text. I have included a screenshot of the 'control' tab of the AutoIt Window Info tool.

Anyone have any ideas on how to search for text in this type of window and then mouse click on this text?

Thanks
Tim

autoupload.png

autoupload2.png

Share this post


Link to post
Share on other sites



Thanks for your reply!

I tried a number of different scripts along the lines of the following with no luck:

#include <IE.au3>

Local $oIE = WinActivate("uLearn - Administration Tools - Windows Internet Explorer")
_IELinkClickByText($oIE, "FRAZERR", 1)

and

#include <IE.au3>

WinActivate("uLearn - Administration Tools - Windows Internet Explorer")
_IELinkClickByText("uLearn - Administration Tools - Windows Internet Explorer", "FRAZERR", 1)

Also trying the following as there are two places where the text is mentioned

_IELinkClickByText($oIE, "FRAZERR")
and _IELinkClickByText($oIE, "FRAZERR", 1)

It activates the existing Ulearn window but doesn't click anything.

Any idea?

Share this post


Link to post
Share on other sites

The persons name is Frazer, not FRAZERR, perhaps that's failing.

Share this post


Link to post
Share on other sites

Thanks for your suggestion but i have tried with "FRAZERR" (searching for user name), "Frazer, Ryan" (full name) & "Frazer" with no luck. I don't think any text on this page is search able unfortunately. That or i am doing it wrong. 

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