I have been able to code a number of VBScript executable routines to do special things to control my home security system program (PowerHome), but have gotten stumped on what seems like it should be the easiest thing I've ever tried. :-(

When my video cameras see motion I want to send a WM_USER message to my security program that is setup to recognize such notices. The camera program can call any executable when motion is detected, so I want a simple VB Script that just sends a Windows Message, using I believe . . .

 SendMessage("PowerHome", WM_USER, 3445, 5)
where "PowerHome" is the handle for the running target window process, and the later two are the parameters to be passed to PowerHome to fire the trigger using Trigger Type WM_USER.

No matter what I have tried, I either compile with a Syntax error, or an Expected end of Statement error.

Since I think this should be just a few lines of code and don't want to prejudice any suggestions, could anyone post a complete VB Script code stream?

BTW. I'm running this in a 64-bit Win7 environment, which I think makes a difference. I also really need a complete program, as the devil is in the details and my many attempts have failed, so I am missing something basic.