Jump to content

How to capture a dialog box in CustomUI Editor

Recommended Posts

i have the following script that loads xml into an excel workbook. all is working good. but would like to expand on my script by capturing a dialog box that confirms the xml is well formed. how can that be done?


#include <AutoItConstants.au3>
run("C:\Program Files (x86)\Office RibbonX Editor\OfficeRibbonXEditor.exe")
WinSetState("Office RibbonX Editor", "", @SW_MAXIMIZE)
MouseClick($MOUSE_CLICK_LEFT, 360, 60, 2)
run("C:\Program Files (x86)\Microsoft Office\root\Office16\excel.exe C:\Users\USERNAME\Documents\Excel\RibbonTester.xlsm")
winclose("Office RibbonX Editor")

so just after the mouse click, when i am sending the enter key, what i would like to happen is to verify that the dialog box appears. if there is an issue with the xml, then the dialog box does not appear and a panel is opened in the editor with the offending line(s) of code. all i need to do is confirm whether or not the dialog box appears. can that be done with autoit?


Link to post
Share on other sites

One way is to use WinWait ("[CLASS:#32770]", "", 2) with a timeout (here 2 secs).  If it returns an error it means that the xml is not valid.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...