InFix, This looks like it will work (the first option (such as dbl click) is what I was going for). Once again you have helped me tremendously.
samael it really doesn't matter in this case because the program will always be running in the background.
I used winamp as an example... but what I am actually doing is making a call to my home automation program. I always turn my house into a haunted house for halloween, and I want to be able to activate some madules and then turn them off seconds later... unfortunately the software (ActiveHome) only allows incrementing in minutes so I could have something come on and I couldn't have it automatically go off for at least 1 min. With this program and system there are housecodes A-P and module numbers 1-16. So K10 could be a lamp and K5 could be the coffee maker. With ActiveHome you can address the path like this:
D:\Program Files\Home Control\X10COMM.EXE k10 on
and that would turn my lamp on. So using the code InFix provided doing this would turn the lamp on from my program:
WinExec("D:\\Program Files\\Home Control\\X10COMM.EXE k10 on", SW_SHOWMINIMIZED);
now I can just do some filling in to make it wait and then do the same except it says "k10 off " and that will turn my lamp off.
I know my methods aren't exactly the best coding, but im only going to whip this together to use for halloween, so as long as it works for me... im happy.
Of course I just got another cool idea while writing this. Turn a light on and open winamp to play a sound such a a scream. Then close winamp, turn light off, and wait a predetermined time later then repeat. So I guess Samael I will have to check to see what is running and all that. For those interested,and want more info on X10 check out:
www.x10.com -I dont really reccommend this site too much, but they have some products... a better is:
www.smarthome.com
comp.home.automation
Also if anyone is interested, let me know and I'll post the code showing the full effect.
I think a high tech edge is going to get some trick-or-treaters this year!!!
-Josh