Adverti horiz upsell
Creating simple user interfaces
Creating simple user interfaces
rueter, added 2006-05-19 08:38:55 UTC 19,841 views  Rating:
(0 ratings)
Page 2 of 4

ask

Show a Yes/No dialog.

This function shows a Yes/No dialog with the given message. ask will return 1 if the user clicked 'yes' or 0 otherwise.


syntax:

ask


examples:

just bring up the dialog but don't do anything

ask "are you still here?"




returns stuff depending on which button the user hits:

if [ask "are you still here?"] {alert "you should go home";return} else {message "yeah, right";return}


get_input
Pops up a box that lets the user type in an arbitrary string.

syntax:
get_input ?default?

example:
get_input "Write something" "something"