Jump to content

Windows with no name


Recommended Posts

Evening all, have just discovered AutoIt and am trying to apply it to some testing we do here. I am trying to writing a script that controls a program that does not set window names properly. AutoIt v3 Window Info reports that the program has a blank window title, but has a class. I can't see an easy way to switch to this window and control it; is there a way to do this using the window class?

Ideally, I need to to go to this window and click on a few buttons and select some menu items from drop-down menus, but without using mouse control; the location of the window may vary as the screen resolution may be different on different setups. Any suggestions on how to do this elegantly, so it will still work if the button is located in a different location?

(incidentally, Window Info also seems to cause this program to crash; I really don't know why. Any thoughts on that?)

Link to comment
Share on other sites

Hi!

This is how you use a window class.

WinSetState("[CLASS:SciTEWindow]","",@SW_MINIMIZE)

Clicking on buttons and such is a job for ControlSend(), check the help file for more info.

muttley

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Thanks! Should that CLASS: approach work with functions such as WinActivate? I am trying the following, but it is not working:

CODE
WinActivate (" [ CLASS:DMWChild]")

Send ("{F1}")

Should that work, or do I need to write the Window title?

However, it is not activating the relevant window, and the F1 is going elsewehre.

Link to comment
Share on other sites

I think that should work... search Window Titles and Text in the helpfile for reference.

WinActivate("[CLASS:DMWChild]")
Send ("{F1}")

The space before the [ is causing the issue

Regards,Josh

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