Jump to content

How to identify a frame with a random Instance number?


Jake657
 Share

Recommended Posts

Hi

I'm trying to create an AutoIt script that will interact with an application. I have successfully used AutoIt before to create scripts for web page but I'm really struggling to get started with this one for an application.

After the app has opened and I manually choose a few options it then opens some frames which I want AutoIT to work with - but I can't figure out how to identify these frames.

The window info tool tells me that the Class for these frames is WindowsForms10.window.8.app.0.378734a

and the Instance is a randon 2 or 3 digit number - each time a new frame is created the Instance number changes

Could somebody tell me how to identify to AutoIT the frame I want to work with?

Thanks very much and sorry if this is a very basic question.

--

Jake

Link to comment
Share on other sites

If you know the title or part of the title, maybe you can try Winexists with "Advanced Window Descriptions"? Something like

WinExists("[REGEXPTITLE:WindowTitleHere ; CLASS:WindowsForms10.window.8.app.0.378734a;]")
Link to comment
Share on other sites

I tried this ...

if WinExists("[REGEXPTITLE:WinTrader 4.5 ; CLASS:WindowsForms10.window.8.app.0.378734a;]") Then
    MsgBox(0, "", "Window exists")
EndIf

but it didn't work. The MsgBox didn't appear.

How would this help me anyway? I don't understand how this would identify which frame in the Window I want to work with.

Thanks for the help, it's much appreciated.

Edited by Jake657
Link to comment
Share on other sites

Ah... from the titel of the window I see someone else has the same Ideas as I have :)

Try something like

$hWnd = WinGetHandle("[REGEXPTITLE:WinTrader 4.5 ; CLASS:WindowsForms10.window.8.app.0.378734a;]")

ControlSend($hWnd, "", "Edit1", "AbCdE")

... and don't miss the _sqlite functions in the UDF for storing "important" information :)

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