Problem with child window with no name

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Provalian
Newbie
Posts: 7
Joined: Mon Jan 23, 2006 3:41 pm
Location: Roanoke VA

Problem with child window with no name

Post by Provalian » Fri Jan 27, 2006 5:55 pm

I am unsuccessfully trying to Send Character/Text> to the Edit field (Edit "01/01/2005") on a child screen. When this screen appears, the cursor is blinking in the Edit field. If I manually type the string in it enters fine. Since the Send Character/Text> command is not working, I am thinking that it is a focus issue. However the window does not have a name as shown in the first line of the View Windows System info. Attempts to get information on this window using GetWindow commands with MessageModal>have all ended with the macro running but not returning any information. The macro continues to run indefinitely until I close the child window, then the macro will return the information on the parent window. I can't seem to get any information from or send anything to the child window. Any advice?

My Script:(The Build Res Characteristics Summary window is open and in focus when this portion of the script is executed)

SetFocus>Build Res Characteristics Summary
Wait>1
PushButton>Build Res Characteristics Summary,OK
//The child window in question appears here
Wait>2
Send Character/Text>01/01/2004
Press Enter

Here are a few things I have tried separately but none have worked:
1.
SETFOCUS> (space after>)
2.
SetFocus> *
3.
Wait>3
GAW>TITLE,X,Y
MSG>TITLE
4.
MouseMoveRel>166,66 (x,y position of Edit entry field)
LClick

View Windows System info
1509112 - #32770 ""
1771258 - Static "Oldest Sale Date:"
1312494 - Edit "01/01/2005"
1574640 - Button "Messages"
1312502 - Static "Enter parameters and click OK"
1312500 - Static ""
526148 - Button "OK"
329542 - Button "Cancel"

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Fri Jan 27, 2006 9:46 pm

Maybe using FindWindowWithText would at least be a way to be sure you have focus on the "nameless child" window. Then you could set WIN_USEHANDLE to 1 to get the window handle. With WIN_USEHANDLE still se to 1, use SetcontrolText to directly populate the EDIT field.

sct>Window_Handle,Edit,X,MyData

where x is the instance of the Edit and MyData is the value/variable you want to place in the field...

of course, this is without testing in your environment, so no guarantee...

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts