Ranorex

ApplicationGetNext()

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython
View previous topic :: View next topic  
Author Message
tkondal



Joined: 03 Nov 2006
Posts: 24

PostPosted: Fri Mar 30, 2007 5:44 pm    Post subject: ApplicationGetNext()
Hi,

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: click into code to enlarge
hWnd = RanorexPython.ApplicationGetFirst();
RanorexPython.ApplicationGetNext(hWnd);


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.

Thanks.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Sun Apr 01, 2007 10:20 pm    Post subject:
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: click into code to enlarge
form = Ranorex.FormGetFirstChild(0)
while form > 0:
    print Ranorex.ControlGetText(form)
    form = Ranorex.FormGetNextChild(0, form)

is the same as

Code: click into code to enlarge
form = Ranorex.ApplicationGetFirst()
while form > 0:
    print Ranorex.ControlGetText(form)
    form = Ranorex.ApplicationGetNext(form)

Jenö
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum