"Hyperlinks demo" Use manual line input echoing. To decide what object is object from address (A - number): (- {A} -). To decide what text is text from address (A - number): (- {A} -). [ A full replacement command as a text ] Command replacement is a hyperlink tag. To say link replacement (T - text): (- MakeTaggedHyperlink((+ command replacement +), {-by-reference:T}); -). Hyperlink handling rule for a command replacement (this is the command replacement rule): suspend text input in the main window, without input echoing; set the current line input of the main window to text from address hyperlink value; set the glk event type to line event; [ Build up commands word by words ] Text appendment is a hyperlink tag. To say link append (T - text): (- MakeTaggedHyperlink((+ text appendment +), {-by-reference:T}); -). Hyperlink handling rule for text appendment (this is the text appendment rule): suspend text input in the main window, without input echoing; set the current line input of the main window to "[current line input of the main window] [text from address hyperlink value]"; resume text input in the main window; Object appendment is a hyperlink tag. To say link append (O - object): (- MakeTaggedHyperlink((+ object appendment +), {O}); -). Hyperlink handling rule for object appendment (this is the object appendment rule): suspend text input in the main window, without input echoing; set the current line input of the main window to "[current line input of the main window] [object from address hyperlink value]"; resume text input in the main window; [ A simple tag for submitting a command ] Submit is a hyperlink tag. To say link submit: (- MakeTaggedHyperlink((+ submit +)); -). Hyperlink handling rule for a submit (this is the submit command rule): set the glk event type to line event; [ Now to put it together ] Drop command is always "drop". Get command is always "get". Get cat command is always "get cat". Jump command is always "jump". Sleep command is always "sleep". The Lab is a room. "Here are some things you can do with hyperlinks. Replacement text commands: [link replacement jump command]JUMP[end link], [link replacement sleep command]SLEEP[end link], [link replacement get cat command]GET CAT[end link] Verbs: [link append get command]GET[end link], [link append drop command]DROP[end link] Nouns: [link append cat][a cat][end link], [link append book][a book][end link], [link append mobile phone][a mobile phone][end link] [link submit]Submit command[end link]" In the lab is a cat, a book, and a mobile phone.