This script UI requires a different solution as the prompt UI. The script is executed via the runpy
Python module and there appears to be no clean way of catching each command before it is executed.
So instead, prior to executing the script, the contents of the script are read and old user
functions are searched for using re.search(). The old user function name has "(" appended to it in
the search so that it is sure that it is a user function call. And the old function must have a
space or newline character preceding it.