Sign in to follow this  
Followers 0
Pallindrome

Hitting a button in a dynamic form with no kbd shortcuts

3 posts in this topic

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!!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Aha! So that's what controlclick is for!! I was wondering about it, but it didn't make sense in the short example I saw. That clears up my problem and gives me a whole new chunk of stuff to look through, thanks for the prompt reply! :)

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  
Followers 0