You had to look at "Options" -> "Preferences"
then hit the enviroment card and mark "use current file for test run".

Another way is to look at the engine card and set your script as the main script. ["options" -> "preferences" -> "engine" ]