Currently there is no way to tell if a script has been added to the script scheduler, and only diag_activeSQFScripts in a loop can somewhat detect changes.
This implementation of script scanning isn't very efficient, so I propose to add a missionEventHandler for when a script is added to the scheduler via 'spawn'.
This even would ideally have the same and/or have more info on the executed script than diag_activeSQFScripts, and would mainly be used for security and/or debugging script heavy systems.
Ex.
scriptName: String - Returns: Script name set with scriptName - May not be possible obviously, depending on how and when scriptName is set File name if script name is empty Preferably the entire executed script to run regex checking filePath: String - path of the parent script
Would be nice to also return whether or not it runs, but I am not expecting it to be possible/worth the time it would take to add.