Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
johngccfc
- Newbie
- Posts: 10
- Joined: Fri Dec 10, 2010 5:24 pm
Post
by johngccfc » Mon Dec 13, 2010 12:01 am
Hi All,
From the main app window at the top, how would i navigate directly to the form object marked with red crosses.
Super-hero status and a blue peter badge to whoever cracks it
Thanks

-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Dec 13, 2010 8:38 am
I would do it like this:
Press Tab
Repeat as necessary (or use the * n suffix).
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Mon Dec 13, 2010 4:01 pm
I interpret your question as "How can I focus or work with this window, since it has no caption or window_title to work with?" Since just highlighting the entry in the "view system windows" utility would server no useful purpose I'm aware of.
Code: Select all
//Do something to make the desired window have the focus
//Use window handles since the title is blank
Let>WIN_USEHANDLE=1
GetActiveWindow>window_handle,X,Y
SetFocus>window_handle
-
johngccfc
- Newbie
- Posts: 10
- Joined: Fri Dec 10, 2010 5:24 pm
Post
by johngccfc » Mon Dec 13, 2010 6:16 pm
Both, thanks for your replies
adroege, the item i wish to reach is a tree view list on a tabbed page on the form. rather than hop, skip and jump my way there I was hoping to be able to ascertain the 'handle' (?) of my treeview list and refer to it directly. So, whilst I can set the focus to the parent windown, my actual app, I then wanted to try and grab the treeview list within it.
If I were in Visual Studio I'd cycle through a list of controls on the form with a ForEach loop and (e.g) stop when I found one of type TreeView. Its that kind of approach I was investigating rather than emulating keystrokes. I will go the keystroke method if necessary but was, rightly or wrongly, looking at the problem through regular development eyes.
-
adroege
- Automation Wizard
- Posts: 438
- Joined: Tue Dec 07, 2004 7:39 pm
Post
by adroege » Mon Dec 13, 2010 6:26 pm
Have you tried.....
Code: Select all
GetTreeNode>WindowTitle,ClassName,Instance,Text,Case,Partial,Result,Handle
Returns in Result the index of the visible tree view node whose caption matches Text.