RoderickMabry Posted August 5, 2009 Report Share Posted August 5, 2009 I have elected to do a Switch and CASE statement to handle the many different dialogs that shows up when during an dialog operation. How do you Get the Window Title of the Current Window or Control in Focus? Example of the dialogs that I am dealing with... http://screencast.com/t/UBN3bTUmaL So if there is an unexpected dialog that shows up, I want to save that Window Title in a variable or log it to a file somewhere. Thanks in advance for any help at all. EDIT: I guess I just found the following: http://pgmacros.invisionzone.com/index.php?showtopic=3899 This method seems to only take the string from the top-most Window Title. It appears this wouldn't work for a dialog that popup within the program. Right? Any solutions? Quote Link to comment Share on other sites More sharing options...
Cory Posted August 5, 2009 Report Share Posted August 5, 2009 How do you Get the Window Title of the Current Window or Control in Focus?Well you would use Variable Set String with the Set to Topmost Window Title. But surely you knew that already which leaves me thinking there's something I'm missing here. Especially given your edit. Perhaps if you explained why this will not work and we can go from there. Also you might check out the Repeat With Windows command. Quote Link to comment Share on other sites More sharing options...
Cory Posted August 5, 2009 Report Share Posted August 5, 2009 It appears this wouldn't work for a dialog that popup within the program. Right? Any solutions?Do you mean an MDI ? If so then that is correct. EG you can't get the title of a Word doc window in Word. However many application pop ups are not children in the MDI. Just try a test to see. Quote Link to comment Share on other sites More sharing options...
RoderickMabry Posted August 5, 2009 Author Report Share Posted August 5, 2009 Actually Variable Set String with the Set to Topmost Window Title does work. I thought Topmost Window meant Parent Window or Program Window. But I have learned here that Topmost Window means "Window with Current Focus" This works. Thanks Cory. Quote Link to comment Share on other sites More sharing options...
Cory Posted August 5, 2009 Report Share Posted August 5, 2009 You are partially correct. In my example of a Word document it would but this is because Word is using MDI (Multiple Document Interface). When the parent app creates a new form it can do so either within or as another form. And usually pop up dialogs are the later. There are a lot of things in MEP which one must experiment with or research as a "So what's what it means by..." kind of thing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.