Sign in to follow this  
Followers 0
alexei

How to send keystroke to the particular window?

4 posts in this topic

Send doesn't refer window!

That means it sends keystrokes to any window, which currently has input focus.

Unfortunately, focus may change at any time because of many reasons, so activation with following Send does not guarantee keystrokes would go where they supposed to. Any suggestions?

Thanks.

PS

Reasons for focus change:

- System popup

- Other app activity

- Other script running

- Remote user

- Cat jumped on keyboard

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

as i understand,

at first, try to take focus on the window which you want to use send(), try this :

winactive("Untitled - Notepad");take focus on the notepad window, change this into yours
send(any thing you want)
Edited by d4rk

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

Any suggestions?

Read helpfile, ControlSend(). It's actually referenced in Send() article, which you apparently haven't read either, and where other alternatives (Opt("SendAttachMode",1), SendKeepActive()) are mentioned.

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Read helpfile, ControlSend(). It's actually referenced in Send() article, which you apparently haven't read either, and where other alternatives (Opt("SendAttachMode",1), SendKeepActive()) are mentioned.

SendKeepActive solves the problem with sending keystrokes to a wrong window. I mislooked it, thanks.

What about mouse? Does SendKeepActive affect MouseClick?

Unfortunately, I can't rely on coordinates and windows may overlap anyway.

Another question is about working with "non-standard" controls, etc. I would like to identify window by its properties and child/parent/owner relations to other (identifiable by title) windows, and then work with it. Is it possible?

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0