Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Box
#1
Does anyone know how to get all the information in a Windows XP Dialog box? I mean somehow selecting the Dialog box and being able to see and I guess edit all of the child windows and text along with whatever that Dialog box may do or contain.


:?:

Tyank You
          PleaseHelp
#2
You can enumerate all accessible objects in a dialog. Use acc with flags=0x8000, x=address of callback function, and other arguments except window = "" or 0.

This macro enumerates all objects in Windows XP User Accounts dialog:

Code:
Copy      Help
Acc a=acc("" "" "User Accounts" "" "" 0x8000 &acc_enum_proc 0)

or, to enumerate objects only in the Internet Explorer_Server child window (it actually is a web page):

Code:
Copy      Help
Acc a=acc("" "" "User Accounts" "Internet Explorer_Server" "" 0x8000 &acc_enum_proc 0)


Function acc_enum_proc:

Code:
Copy      Help
function Acc&a level lParam

str name=a.Name
str role
a.Role(role)
out "%s ''%s''" role name

ret 1

When you have reference to accessible object (variable a), you can manipulate the object using accessible object functions.
#3
OK;

That was far above me however, I have a great deal of patients and I will do my best to decipher the information that you gave me.

I know that this might sound insane butt could you give me some more genius thoughts. You see I am just a few weeks new to QM and I find this entirely complex and fascinating. Is there any ware that I can find a collection of macros that control Windows XP?

Thank You
PleaseHelp :!:
#4
I've learned everything from the exapmles in the help file and by studying the code in the System folder.
Matt B
#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.


Forum Jump:


Users browsing this thread: 1 Guest(s)