This example illustrates how to terminate FLY! using the PID of the process.
KillTask() returns -1 if the kill failed, 0 if it may have been killed, and 1 if it was killed for sure.
local int PID, int Success
PID = RunTask("fly", "", "", Null)
Print "PID = ", PID
call Sleep(3)
Success = KillTask( PID )
Print "Task killed? ", Success
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.