Your difficulty stems from the fact that the Show Custom Dialog script step is not IWP compatible. (You can check compatibility at the bottom left of your Edit Script window.) In order to make this work, you'll need to create a layout for use in IWP that mimics the same functionality.
You can use a pair of global fields, one editable in browse mode (to hold the user's query string), and one not (to hold your message). Put a couple of buttons on the layout (one for "Continue", one for "Cancel"). Set your message field, go to the appropriate layout, and display it to the user.
I usually like to do such things in two stages - one script to set it up, another set of scripts (one for each option - "Continue", "Cancel", etc.) to finish. But you can use a "Pause Script" if you like; I just prefer to have more control.