Jump to content
JNutt

AutoIt v3 Window Info

Recommended Posts

JNutt

Hello, I'm new to AutoIT and looking for documentation on the AutoIT Widnow Info app.  I see some help doc's, tutorials and a lot in the wiki but nothing specific to how the Window info is designed to work. 

Thanks!

Share this post


Link to post
Share on other sites
JNutt

Thanks Bilgus.  I did see that doc, but I was looking for more info. I've been just watching youtube videos and following but thats pretty slow\time consuming.  

I've done the drag-n-drop, but was unsure which coordinates from which tab to use.  The vid I was watching the guy was using Mouse/position.  Today I ran my script and it didn't work (same machine/resulution etc).  I checked the  mouse/position coord's and they were different.

In general I was wondering what the different tabs are for and best practies.  Also I wondered about Options->'freeze' and 'coord mode'.

Share this post


Link to post
Share on other sites
Bilgus

Ok I'll try to do a quick rundown

Tabs

  • Window - Literally the window itself, its generally the parent window but sometimes you can only get a child window
  • Control - Sometimes this works sometimes not but it will be an individual control on the window
  • Visible Text - Literally text that can be seen
  • Hidden Text - Sometimes controls have hidden text and sometimes window info can find it
  • StatusBar - text in that little status bar on the bottom of some windows and their index
  • ToolBar - items in a toolbar and their index
  • Mouse - Mouse position and color under cursor
  • Summary - All of the above

Frozen just makes it so once you drop the target it keeps the info from the window as it was when you dropped it

I'd suggest pointing it at a few windows and see what you see

like the autoit help file for instance

As for mouse coords thats a terrible way to do anything unless you have to

In the help file Checkout 

Controls

ContrlSend

and try some the examples within

Between the autoit help file and the forum there isn't much you can't do

If you get stuck post your code using the <> and someone will help you

  • Like 1

Share this post


Link to post
Share on other sites
BatMan22

Don't know exactly what info you're looking for.. but check out this if you want an easy to follow Youtube Video/Series, I recommend watching his AutoIt Series from the very begging:

 

  • Like 1

Share this post


Link to post
Share on other sites
JNutt

Thanks!  Quick question.  I have a button I want my script to click on.  I've been getting it this way

WinWait('Select an INVx File')
WinActivate('Select an INVx File')
MouseClick('primary', 563, 55, 1, 0).

 

Is this a good method?  I wish I could instead specifiy the window title + the button name (assuming there is one), instead coordinates.  
 

Share this post


Link to post
Share on other sites
JNutt

I've seen some of his videos. They are pretty good and helpful.  I'll keep watching them.

Share this post


Link to post
Share on other sites
Bilgus

Control Click is the way to go if you can find the button

ControlClick ( "title", "text", controlID [, button = "left" [, clicks = 1 [, x [, y]]]] )

And the cool thing is that you can use the data under AdvancedMode to get the right control

See: Controls in the help file it outlines it pretty well

 

  • Thanks 1

Share this post


Link to post
Share on other sites
BatMan22
45 minutes ago, JNutt said:

Thanks!  Quick question.  I have a button I want my script to click on.  I've been getting it this way

WinWait('Select an INVx File')
WinActivate('Select an INVx File')
MouseClick('primary', 563, 55, 1, 0).

 

Is this a good method?  I wish I could instead specifiy the window title + the button name (assuming there is one), instead coordinates.  
 

Like Bilgus said, use the control commands where/when possible.  ControlClick/ControlSetText/ControlGetText are a few examples, they don't have the  usual problems that MouseClick does, for example, if you change the window size, unless you're set coordinates to Window mode and those are window coordinates, your mouse click will 'miss', Even with window mode enabled it will still miss something based on other factors. The way you have done it, with WinWait/WinActivate before and ControlClick after and your program will almost never fail. Good luck dude.

  • Thanks 1

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

×