Class library usage, coding and language questions.
Posts: 24
Joined: Fri Nov 03, 2006 5:50 pm


Post by tkondal » Fri Mar 30, 2007 4:44 pm


I am trying to use the ApplicationGetNext() function but keep on getting incorrect argument errors. I am passing it a valid handle as a parameter:

Code: Select all

hWnd = RanorexPython.ApplicationGetFirst();
What is the correct parameter list, and could you please update this in the documentation file as well?

Btw, is there a tool that I can use in the future to detect the proper function arguments, something like a DLL viewer for the exports; I tried PE Explorer, but it isn't able to get the function argument list.


Site Admin
Site Admin
Posts: 350
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Sun Apr 01, 2007 9:20 pm

We found and fixed a bug in the ApplicationGetNext() function last week.
We will release this fix in the next version.

But you can do the same with the FormGetFirstChild and FormGetNextChild functions.
If you use the functions with handle = 0, then you can enumerate the top level windows.

Code: Select all

form = Ranorex.FormGetFirstChild(0)
while form > 0:
    print Ranorex.ControlGetText(form)
    form = Ranorex.FormGetNextChild(0, form)
is the same as

Code: Select all

form = Ranorex.ApplicationGetFirst()
while form > 0:
    print Ranorex.ControlGetText(form)
    form = Ranorex.ApplicationGetNext(form)

Ranorex Team