You can just say something like:
field1.text:alert["What's your name?" "string"]
Here’s an Ask button that asks the question, and sticks the response into a field:
%%WGT0{"w":[{"name":"field1","type":"field","size":[100,20],"pos":[154,108],"value":"blorp"},{"name":"button1","type":"button","size":[60,20],"pos":[174,74],"script":"on click do\n field1.text:alert[\"What's your name?\" \"string\"]\nend","text":"Ask"}],"d":{}}