you could also pop this at the end of the script and be able to turn it off via the menu,channel or status window:
#script end
Menu menubar,status,channel {
@SCRIPT_NAME
.$iif($group(#script).status == on,$style(2)) Enable:/.enable #script | echo -ts 3SCRIPT_NAME has been Enabled.
.$iif($group(#script).status == off,$style(2)) Disable:/.disable #script | echo -ts 4SCRIPT_NAME has been Disabled.
}
With this you can right click on your screen and it will show in the menu,or from the tools tab and also the status window(change SCRIPT_NAME to the name you want).It will msg your status window when you enable/disable it.
(not my code so all respect and cred to the original writer).