The "write[]" function prompts the user to save a file. If you call write[] with an image interface, for example, it will prompt the user to save that image as a .GIF image file.
After you paste code into the listener, don't forget that you need to press shift+enter to evaluate it! The reference manual section for the listener can be found here: https://beyondloom.com/decker/decker.html#thelistener