surferdog Posted April 3, 2009 Share Posted April 3, 2009 (edited) Good afternoon. I am attempting to configure a piece of software and need to interact with a popup window but am unable to with my limited knowledge of autoit. I have the software install scripted but am having this issue when trying to simply send a "yes" to an error or popup window. I open a treeview in the installed software with the following code: #include <GuiTreeView.au3> Run("C:\IngresII\ingres\bin\vdba.exe") WinWaitActive('Ingres Visual DBA [II]','List of Virtual Nodes') ControlTreeView("Ingres Visual DBA [II]", "", "[CLASS:SysTreeView32; INSTANCE:1]", "Expand", "Nodes") This works as expected and a popup occurs which is also expected to continue the config however I am unable to send a keystroke to this popup window through autoit but can send a manual keyboard keystroke to it. I am able to get info from the Window tool on this popup but am at a crossroads on how to interact with it and everything i've tried has failed to get a focus on the window. Neither a send or controlsend work and WinWaitActive and WinActivate have no effect on the window. I'm not sure if anyone is able to assist but thanks in advance anyways. Have a great weekend. Here's the Window Info: >>>> Window <<<< Title: Error Class: #32770 Position: 155, 228 Size: 503, 133 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x002601BE >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 6 Text: &Yes Position: 170, 67 Size: 75, 23 ControlClick Coords: 44, 17 Style: 0x50030001 ExStyle: 0x00000004 Handle: 0x001E01B2 >>>> Mouse <<<< Position: 372, 341 Cursor ID: 2 Color: 0xECE9D8 >>>> StatusBar <<<< >>>> Visible Text <<<< &Yes &No Your Ingres Installation must be started before trying to get the list of nodes or connect. Do you want to start it now ? (If not, you only will be able to load an environment) >>>> Hidden Text <<<< Edited April 3, 2009 by surferdog Link to comment Share on other sites More sharing options...
Authenticity Posted April 3, 2009 Share Posted April 3, 2009 What about: $sText = 'Your Ingres Installation must be started before trying to get ' & _ 'the list of nodes or connect.' & @CRLF & 'Do you want to start it now ?' & _ @CRLF & '(If not, you only will be able to load an environment)' WinWaitActive('Error', $sText) $hWnd = WinGetHandle('Error', $sText) ControlClick($hWnd, '', '[CLASS:Button; INSTANCE:1]') Link to comment Share on other sites More sharing options...
surferdog Posted April 3, 2009 Author Share Posted April 3, 2009 Thanks Authenticity but same result. I appreciate the effort. Link to comment Share on other sites More sharing options...
Developers Jos Posted April 3, 2009 Developers Share Posted April 3, 2009 Try setting: Opt("WinSearchChildren", 1) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
surferdog Posted April 3, 2009 Author Share Posted April 3, 2009 Thanks Jos...no go. Here's a dumb question but could there be an issue with the popup being titled "Error"? Link to comment Share on other sites More sharing options...
Authenticity Posted April 3, 2009 Share Posted April 3, 2009 Don't think so. I think it's what Jos is pointing on, probably because the MessageBox API is called with the the first parameter set to the window's handle (it's now a child of it in other words) the Win* functions can see him by default. That can be examined using WinSpy to see the windows hierarchic of the process. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now