Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Box
#5
This macro does exactly what you asked - displays information about child windows in a dialog box. To see how it works:

1. Create new function (menu File -> New -> Function), name it acc_enum_proc, and paste the code from third code box (function Acc...).
2. Create new macro with whatever name and paste code from first code box.
3. Go to the Control Panel and open the User Accounts dialog, because this sample macro works only with that dialog. To make it work with some other dialog, edit "User Accounts". To make it work with any window or dialog that is active, replace "User Accounts" to "".
4. Run the macro. It shows role and text of each object of the dialog in the QM output pane. I think it is what you asked.
5. How it works: The acc function, when called in this way, calls the acc_enum_proc function for each object in the dialog. The acc_enum_proc function retrieves object's role string and text, and displays it in the QM output.
6. If you also want to get/set other properties of the object, or do some actions, edit the acc_enum_proc. You see how it gets name. Similarly you can get other properties, etc. Just type the variable name and period (a.), and the list of available functions will be shown. Double click a function in the list and it will be inserted in code. You can see basic information about its usage in the status bar. You also can use the Accessible Object Actions dialog to insert these functions. These functions are very simple and not documented in the help file, however acc is documented.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)