Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog Box
#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.


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)