Ok, I have looked, but have not found the answer yet, I need to know three things:
1. How do I check if a command is already running?
2. If a command is already running, is it the array command?
3. How do I cancel it if it is?
I am creating a tool palette, so it is possible that a command is already running, but it is also possible that I will need to not cancel the command, but interact with this command while it is running, so I do need to know how to do both things separately.