One handy way to display instructions to users is by displaying an HTML page on top of the application window. To do so, use the viz.window.displayhtml(<html page>) command. To make the page disappear, use viz.window.hidehtml(<html page>).
To create a help file for a given script, include an html file with your script's name and ending in the extension '.html' (e.g. 'myscript.html' ) in your script's directory. When users hit the F1 key while your world is running, the html file will be displayed.
Getting data from GUI elements