Add function to interact with the scripting engine