How would I have a program wait for me to press "ctrl+shift+c" or something similar while in another program to execute?
How would I have a program wait for me to press "ctrl+shift+c" or something similar while in another program to execute?
"How would I have a program wait for me to press (x) while in another program to execute"...
Possible interpretations:
1) You want a program to execute when you press a button in another program
2) You want your program to suspend itself until a keypress in another application
3) Some other obscure interpretation
You seriously have to word your question better. It's sort of unintelligible at the moment.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
One other possible interpretation:
He wants to make a hotkey to launch his program from anywhere within windows.
> You seriously have to word your question better. It's sort of unintelligible at the moment.
Agreed.
If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
What happens is not as important as how you react to what happens. -Thaddeus Golas
That's what I want, sorry for not being more specific.Originally Posted by Codulation
Last edited by Jareds411; 09-16-2004 at 05:44 PM.
Well, I'm not totally sure where hotkey messages are captured from (does the hotkey have to be pressed in the window of the program?), but you could look into RegisterHotKey(). Write a program that calls that at startup, and handles the WM_HOTKEY message by launching your target application (look into CreateProcess(), or less preferably system()). You'll need to know a small amount of Windows API code to do so though.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
>does the hotkey have to be pressed in the window of the program
A hotkey is handled at the Windows level and has nothing to do with your program. It's only a way to tell Win. to launch your program.
BTW, in Win XP in the properties of a shortcut, you can set a hotkey to launch it.
If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
What happens is not as important as how you react to what happens. -Thaddeus Golas