Jump to content

Hitting a button in a dynamic form with no kbd shortcuts


Recommended Posts

Hi!

I used Autoit many years ago for extensive testing of software and using some very large, involved and looping scripts. A friend of mine is having difficulty with a program that I thought Auto-it could help with, and made great progress with it but I've found I'm suddenly stuck on one single point, so I hope someone can help out!

The sticking point is that the target window that has no keyboard shortcuts (take a look at GUI - Message Loop.au3 in the tutorial for an example of this). The button I need to hit is at the bottom of the second tab, and under a dynamically resizing field. I can't guarantee which tab will be open when I need it, nor which field will have focus on that tab, and obviously the position of the button will change depending on the size of the field above it.

Is there a better way of getting at this button without taking a machine gun/fire hose approach and clicking at 5 pixel intervals from the bottom margin upwards in hopes of hitting it?

Suggestions are welcome, thanks!!

Link to comment
Share on other sites

Examine the window with the AutoIt Window Info Tool (AU3Info.exe) and get identifying information on the button. Then target the button directly, for example with the ControlID number, using ControlClick().

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...