HELP: Sending keys to minimized application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khickyphutz
    New Member
    • Nov 2006
    • 7

    HELP: Sending keys to minimized application

    Hi All,

    I would like to ask help regarding Sending of Keys to specific application which is not currently focus or which is minimized (not active).

    Example: (But works only if the application is active)

    Dim ReturnValue
    ReturnValue = Shell("NOTEPAD. EXE", 1) ' Run Notepad
    AppActivate ReturnValue ' Activate Notepad.
    SendKeys "ABCDE"

    My problem with this sample is that... it will only send the key to NOTEPAD application if notepad is the currently focused application. I wanna send keys to NOTEPAD even if it is not the current focused application.

    Any idea on this?

    Hope you guys can help me..

    Thank you and God Bless,

    Borgy Manotoy
    Last edited by Killer42; Jul 27 '07, 03:52 AM. Reason: Removed e-mail address
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    I think you might be out of luck.

    Not sure I'm 100% correct, but the way I understand it is that SendKeys doesn't send them to anywhere in particular. It effectively just says to Windows "this key was pressed". Windows then handles the keypress as it would normally, which generally means that whoever has the focus will receive it.

    That being said, I think it is possible to be minimised and still have focus.

    By the way, please don't post e-mail addresses. Spammers and scammers like to harvest them from forums such as this.

    Comment

    Working...