|
-
Mar 21st, 2006, 08:41 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] sendkeys to a application
how can i sendkeys to an application on my desktop?
any ideas guys?
-
Mar 21st, 2006, 08:49 PM
#2
Re: sendkeys to a application
-
Mar 21st, 2006, 08:57 PM
#3
Thread Starter
Frenzied Member
Re: sendkeys to a application
but i want to pick the application to send to
-
Mar 21st, 2006, 08:59 PM
#4
Hyperactive Member
Re: sendkeys to a application
Then I think you need to use APIs.
-
Mar 21st, 2006, 09:16 PM
#5
Frenzied Member
Re: sendkeys to a application
If you want a simple way use AppActivate...
VB Code:
AppActivate "Program's Title Here"
SendKeys "Spit in my mouth, baby!"
It's a shotty but quick way to pull the program up front before sending the keys.
-
Mar 22nd, 2006, 03:41 PM
#6
Thread Starter
Frenzied Member
Re: sendkeys to a application
 Originally Posted by Spajeoly
If you want a simple way use AppActivate...
VB Code:
AppActivate "Program's Title Here"
SendKeys "Spit in my mouth, baby!"
It's a shotty but quick way to pull the program up front before sending the keys.
thanks, by that do you mean the programs window title at the top? like for e.g, this window for me would be
VBForums - Reply to Topic - Microsoft Internet Explorer
-
Mar 22nd, 2006, 04:38 PM
#7
Lively Member
Re: sendkeys to a application
thanks, by that do you mean the programs window title at the top? like for e.g, this window for me would be
VBForums - Reply to Topic - Microsoft Internet Explorer
Yeah, thats what Spajeoly meant. The other option you could use other than window title is the window handle. You could check it using Spy++, Ive used this option to move windows and sendkeys too. But I find sometimes for a window/program the handle changes which makes using the Program title or window name easier.
-
Mar 22nd, 2006, 06:10 PM
#8
Hyperactive Member
Re: sendkeys to a application
Is there a way without using APIs' to list the currently open window names?
For example, if I wanted to send it to this browser window I'd want to us left$() because I'd have these options:
VBForums - Reply to Topic - Microsoft Internet Explorer
VBForums - Reply to Topic - Mozilla Firefox
-
Mar 22nd, 2006, 09:05 PM
#9
Conquistador
Re: sendkeys to a application
No, you'd need to use an API to list the currently open windows.
If you're looking for a specific window all the time, you can use the FindWindow API, with the class name (you can get that in Spy++ iirc).
Other than that, you have to enumerate all the open windows!
-
Mar 24th, 2006, 10:58 AM
#10
Thread Starter
Frenzied Member
Re: sendkeys to a application
thanks guys, but how can i then hit the enter button on the keyboard?
currently i tested it on a messenger conversation i had open with myself
i sent the message 'hello'
it put 'hello' in the messenger send box, this is fine, but i also wana make it hit enter!
-
Mar 24th, 2006, 11:03 AM
#11
Re: sendkeys to a application
Im sure about 50 other people have asked this, have you had a good search of the forums?
-
Mar 24th, 2006, 11:17 AM
#12
Re: [RESOLVED] sendkeys to a application
If your using SendKeys then it's {ENTER} or ~ .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|