Is there some way to run a python script in AI2?

There is no method to stop it, but you can handle what to do with it in the GotFile event (e.g. save/delete)

please note however: