Code: Select all
a = RunProgram("cmd.exe", "", "")
Delay(1000)
Debug a
Debug IsProgram(a)
Debug ProgramRunning(a)
Debug KillProgram(a)
Code: Select all
a = RunProgram("cmd.exe", "", "")
Delay(1000)
Debug a
Debug IsProgram(a)
Debug ProgramRunning(a)
Debug KillProgram(a)
Little John gave you the answer (it's in the manual too), but the line before it was your clue: IsProgram(a) returned 0, so you're trying to kill a program that isn't identified.rotacak wrote:But it will fail at ProgramRunning(a). Can someone explain me why?
Code: Select all
a = RunProgram("cmd.exe", "", "")
Delay(1000)
If IsProgram(a) = 0
Debug "Program not found"
Else
KillProgram(a)
Debug "Program found and killed"
EndIf