how can i be sure that the text i'm typing gets to the right

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

how can i be sure that the text i'm typing gets to the right

Post by eg252 » Thu Dec 16, 2004 2:57 pm

i setfocus> to the right window,
but how do i make sure that the window is still in focus when i send> characters?
I only want to send characters to a specific window. if that is not the open window set the focus again BEFORE typing further?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Dec 16, 2004 3:21 pm

What you are doing is correct. Just SetFocus before sending the text:

SetFocus>WindowTitle
Send>hello world
MJT Net Support
[email protected]

eg252
Newbie
Posts: 11
Joined: Thu Dec 02, 2004 5:32 pm

the focus might change after some typing

Post by eg252 » Thu Dec 16, 2004 3:25 pm

i have to sure that all the typing is done to the right window. is there a way to check if the typing went to the right window, or if i am still on the right window after the typing?
i also still am not getting emails when you replied.

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Dec 16, 2004 3:34 pm

Well, you could use GetActiveWindow after sending the text to see if that window still has the focus. If not you know it must have failed:

SetFocus>windowtitle
Send>Hello World
GetActiveWindow>window,x,y
If>windowtitlewindow,dowhatever
MJT Net Support
[email protected]

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