Jump to content

AutoIt v3 Window Info


Recommended Posts

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!

Link to comment
Share on other sites

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'.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.  
 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

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