The WIL Tutorial
|
Here we have functions which display information to the user and prompt the user for information, plus a couple of relevant system functions. Display (seconds, title, text)Displays a message to the user for a specified period of time. The message will disappear after the time expires, or after any keypress or mouse click. Example:Display(2, "Please wait", "Loading Solitaire now")
Message (title, text [, addl-text [, buttons [, icons ]]] )This command displays a message box with a title and text you specify, which will remain on the screen until the user presses the OK button.
Example:Message("Sorry", "That file cannot be found")
Pause (title, text)This command is similar to Message, except an exclamation-point icon appears in the message box, and the user can press OK or Cancel. If the user presses Cancel, the WIL program ends (or goes to the label :cancel, if one is defined).
Example:Pause("Delete Backups", "Last chance to stop!")
AskYesNo (title, question)Displays a dialog box with a given title, which presents the user with three buttons: Yes, No, and Cancel. If the user presses Cancel, the WIL program ends (or goes to the label :cancel, if one is defined). Otherwise, the function returns a value of @YES or @NO.
Example:response = AskYesNo("End Session", "Really quit Windows?")
AskLine (title, prompt, default [,format])Displays a dialog box with a given title, which prompts the user for a line of input. Returns the default if the user just presses the OK button.
Example:yourfile = AskLine("Edit File", "Filename:", "newfile.txt", 0)
If you specify a default value (as we have with NEWFILE.TXT), it will appear in the response box, and will be replaced with whatever the user types. If the user doesn't type anything, the default is used.
BeepBeeps once. Beep
And if one beep isn't enough for you: Beep
TimeDelay (seconds)Pauses WIL program execution. The TimeDelay function lets you suspend processing for a fixed period of time, which can be anywhere from 1 to 3600 seconds.
|