Press the green flag to start then just use the arrow keys to get where you want the bat to go (the end).
I borrowed some scripts from kredmond's maze, then I had to change some things in order to make it work with the different levels.