Glutch

IE - Find text, click 100px to the left of text.

4 posts in this topic

#1 ·  Posted (edited)

Hello!

I've been having a big struggle figuring out how to solve this problem. So basically i want AutoIt to search for a specific text. For example "Hello" and then click 100px to the left of that text. I'm creating the script for Internet Explorer.

How i would solve this problem as a human is simply:

1. CTRL+F "Hello"
2. Drag mouse & click

I would greatly appreciate a solution to this, and im completely new to AutoIt so ELI5!

_IEGetObjectById does not work here in this case, and i dont know how to click 100 pixels left of said object.

Edited by Glutch

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Welcome to AutoIt and the forum!

I suggest you have a look at the IE UDF that comes with AutoIt.

Edit:

I just noticed that you have tried the UDF already.

Can you please post the script, a link to the URL you try to automate and a description of the error you get (if any).

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Provide a url that we can test on, if you can't/won't use the url you're actually working on, then you can:

1.  Find a site that is similar to your issue that we can use.

2.  Create html that we can run in a browser that demonstrates your issue that we can test on.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Thank you for the answers. I solved it like this
 

Send ("{CTRLDOWN}")
   Send ("f")
   Send ("f") ; donno why i need this, but i do
   Send ("f") ; donno why i need this, but i do
   Send ("f") ; donno why i need this, but i do
   Send ("{CTRLUP}")
   MouseClick("Left", 244, 68)
   Send ("Hello")
   MouseClick("Left", 119, 836)

Its a bad solution, but it works everytime. Even though the list it searches through has 100 different rows.

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