Hello, I'm trying to write a simple little TAsk Schedulaer app
When my lable caption timer hits a certian time It's supposed to load a program
If lblTime.Caption = "9:11:25 AM" Then
fullpath = "C:\windows\notepad.exe"
iTask = Shell(fullpath, vbNormalFocus)
pHandle = OpenProcess(SYNCHRONIZE, False, iTask)
'ret = WaitForSingleObject(pHandle, INFINITE)
'ret = CloseHandle(pHandle)
However this opens 6 instances of notepad! and i only want it to open one... I'm not really sure what those last two things:waitforsingleobject, and closehandle do so i just commented them out.
Please help i'll be in the IRC if someone needs more info.
-edit: Perhaps it has something to do with timer interval?