input$ = InKeyStr(type[, maxlen, password, cursor])
typespecifies the characters that are allowed to be typed in.
maxlencan be used to limit the maximum length of the user input (default is 0 which means no limit). If
passwordis set to
True, Hollywood will show an asterisk (*) for every character typed in.
The following types can be specified currently:
If you have layers enabled while using this function, you will get
a new layer of type
Starting with Hollywood 8.0, there is a new optional argument named
If this is set to
InKeyStr() will show a cursor while the user is
typing. In that case it is also possible to use the cursor keys to navigate
backwards and forwards and it is also possible to delete characters using
the DEL key. The cursor will be drawn in the same color as the text.
Hollywood 8.0 also adds paste support to
InKeyStr(). Just press CTRL+V
(on Windows) or CMD+V (on all other systems) to paste text from the clipboard
into the current insert position.
maxlencharacters; otherwise he can input as many characters as he wants and finish his input by pressing the RETURN key (defaults to 0 which means that the user can input as many characters as he wants)
True, Hollywood will display an asterisk (*) instead of the actual character typed in (defaults to
True, a cursor indicating the current insert and delete position will be shown (defaults to
Print("What is your name? ") name$ = InKeyStr(#ALPHABETICAL) Print("Hello", name$, "!")The code above asks the user to enter his name and then it will be output.