Jump to content
Sign in to follow this  
poematrix

Newbie: Can I do this with AutoIt? How?

Recommended Posts

poematrix

Hi.

Here is a short version of what I need to do. I must wait for a 3rd party application to be launched. When the user accesses a specific window in that application, he may click a speeddbutton "Find Items". If so, I want to read the content of a combobox that is located on the same window. I.e. when speedbutton "Find Items", with handle value 0x00280BAA is clicked, then I want to read the text of the combobox, whose handle value is 0x000F0D12.

Can I do this with AutoIt?

Is there a better way to accomplish the above?

Which functions of AutoIt do I need utilize to accomplish this one way or another?

Are there examples that demonstrate some or all of the above functionality? If so, where do I find these specific examples?

If I must use coordinates instead of handles, what do you recommend that I do, in order to make the program run on different machines with different screen resolutions (assuming I cannot control the screen resolutions)?

I am assuming that the handle values are allocated relative to the application and are constant, if the program or even the computer are shut down, and restarted, or even if the program is running on a different computer altogether, provided that in all cases these cases the same operating system, XP, is being used. Assuming that the handle values were consistent over a few tests, is this something that I can rely on permanently?

Thank you for all and any answers, pointers, etc.

Elan

Share this post


Link to post
Share on other sites
water

I think this should be possible using ProcessExist to wait for the application to be startet, WinWait to wait for the specific window and WinGetHandle/GUICtrlGethandle to get the handle of the window/control you need.

AFAIK you can't rely on the handles to be constant. Therefore you need to use the xxGethandle functions.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
poematrix

Hi "water".

Thanks a lot for your rapid response. This is the information I was looking for. Now - with the help of AutoIt's great help file and example programs - I think I should be able to do my work quite easily.

One more tip for anyone that may follow this thread in the future: If you go to the entry for "ControlGetHandle" ("Window Management"->"Controls") in the AutoIt3 helpfile, and you click on the "See Controls" link, you will get a very informative discussion of controls and how to interact with them.

Thanks again to "water" and the AutoIt team. AutoIt is truly a brilliant program.

Elan

Share this post


Link to post
Share on other sites
water

Glad to be of service >_


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

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  

×