Manipulating XUI Dialog Boxes using the AOM
AOM Window and View interfaces work on both XUI dynamic dialog boxes and PTC ArbortextEditor Edit windows. A XUI Window object can be obtained when the dialog box is created. For example, the following JavaScript statement returns an AOM Window object.
var window = Application.createDialogFromFile("C:\find.xml");
An Edit Window object can be obtained by converting an ACL window ID to its corresponding AOM Window object. For example:
var window = Acl.getWindow(5);
Whether or not the window with focus is a XUI dialog box or an Edit window, you can use the following JavaScript statement to get its Window object.
var window = Application.activeWindow;
Once you have the Window object, you can call the methods of the Window interface to manipulate the window. For example, the following JavaScript code moves the active window to a specific location:
Application.activeWindow.moveTo(200, 200);
You can find a complete list of methods for the Window interface in the Window interface chapter of the Programmer's Reference.