Jump to content

Click on a button in a SunAwtFrame


Recommended Posts

Hello everyone,

I need to make a small script that detects a dialog window that opens up and has two buttons: Save all/ Cancel.

The problem is that this window class is SunAwtFrame, and I cannot get any info about the buttons, but I can get the title text.

This window will pop up several times, so I need to detect each time it comes up, and answer save all, so my work continues unattended.

I think a method to click the desired button could be to somehow click at certain coordinates, relative to this window's position, after bringing this window into focus.

Maybe my question is silly, because I see that AutoIt is a very powerful tool, but am not sure how to handle this type of window. Any suggestion or example would be much appreciated!

Thank you!

Link to comment
Share on other sites

try junkew's simplespy.au3 found in the zips referenced by FAQ 31 IUIAutomation and post back. maybe give us something we can test also would help. what app are you trying to automate? can I try it?

 

 

Edited by Earthshine

My resources are limited. You must ask the right questions

 

Link to comment
Share on other sites

It is a window from Matlab, from a 3rd party app.

I don't think you could recreate the eviroment, because it is a proprietary plugin part of a more complex setup. There are several scripts and tools which in the end create embedded auto generated code, from Simulink models. The script splits the complex models into smaller ones, does the job for one, but then the save all window pops up which (for now) cannot be bypassed by commands. So I have to sit and click that window from time to time. Until I find a more elegant solution, I could autoclick this window with AutoIt :)

I will try your suggestion and let you know if it works.

Thank you

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