Interesting script, could perhaps use a bit more explanation since I wasn't exactly sure what it did, so if someone didn't know what marquee meant they'd probably be lost.
But I noticed two things about this script. The custom window didn't wrap the text the same as the dialog. I don't know if you did that on purpose or because it couldn't be done the same way. But it just seems inconsistent to me. Also when I closed the custom window test I got a slew of "* /did: invalid parameters" errors since I'm guessing it does a whole cycle before checking if the window is closed