Multi-Windows + Hyperlinks

I have spent far too much time trawling through the GitHub links on Inform 7 extensions looking for this, and I hope someone can help me. All the extensions I find are either not compatible, out of date, or don’t compile.

How do I get a multi-window interface (eg, an inventory window and a room-description/exits window) with functioning hyperlinks? Which extensions actually cooperate to do this?

Edit: I should mention what version of Inform I’m using, but I’m afraid I don’t know; I updated to the most recent version as of about 3 months ago.

For multiple windows you will want to use Flexible Windows. I’m currently in the process of reworking how the Glulx utility extensions are organised, so there’s several to download, and they aren’t available from the public library. Here’s a list:

github.com/i7/extensions/blob/m … 0Rules.i7x
github.com/i7/extensions/blob/m … Events.i7x
github.com/i7/extensions/blob/m … covery.i7x
github.com/i7/extensions/blob/m … itions.i7x
github.com/i7/extensions/blob/m … Points.i7x
github.com/i7/extensions/blob/m … ffects.i7x
github.com/i7/extensions/blob/m … indows.i7x

Hyperlinks are not very complicated at their simplest, but it depends what you want to do with them. You only need two I6 phrases to set them, and then a glulx input handling rule to respond to them. But there are many different kinds of responses, and you haven’t said what you’d like to do with them. But this file has the code that was in an older version of Flexible Windows:

github.com/i7/kerkerkruip/blob/ … rlinks.i7x

In my reworking I haven’t written a new hyperlinks extension, partly because I’m not sure what use cases people have for them. That code will work, but there isn’t any documentation sorry.

Thanks for the response.

My plan for hyperlinks was just to create clickable command links. If I had an Inventory window it could contain examine, drop, and other relevant commands for all items (eat, wear, etc); for a Room window, it could contain clickable links for exits or any other clickable things listed in the room description (such as examining or talking to people). I wasn’t thinking web-accessing hyperlinks, really.

I have used an extension for Hyperlinks already, and they work, but the existing extension doesn’t play nice with Flexible Windows, probably due to version control and/or naming conflicts. I’ll take a look at the links above and see what works. If I must reformat all my hyperlinks, then I must.

In the Windows IDE the version number is printed at the bottom of the window, or alternatively it can be found in Help–About Inform. I don’t know whether the various IDEs are consistent in this. But you could always compile a minimal game and look at the banner text. (Version 6M62 was released about 3 months ago.)

Dannii, thanks again for the help. Here’s where I am: I can get the windows to compile; that works just fine. However, although the hyperlinks appear, they do not seem to be clickable, at least within the confines of the IDE. Previously I was using Emily Short’s Basic Hyperlinks and they worked in the IDE, but this does not.

I see code that says “if glk hyperlinks are supported” but I’m not sure whether that is firing correctly. Any ideas?

Can you post a minimal version of your code here?

I will tonight. I used the example code for an inventory window found in Flexible Windows and added a rule to print a hyperlink for “drop envelope.”

Is it possible to have a type-name conflict when you don’t have the other extension included? When I tried Flexible Windows in the past, it generated conflicts with “measurement” and “height” (both of which I used in another extension elsewhere). When I tried including the above Hyperlinks code in a more complete game, it wouldn’t allow “processing hyperlinks for something is an activity on G-windows,” claiming that they were two different things and this was not allowed. When I built a small test platform, as described above, that problem went away but then it just didn’t work.

I’ll post the code tonight.

Here is the code. I have verified that all the included extensions are the versions linked above.

[code]Include Alternative Startup Rules by Dannii Willis.
Include Glk Events by Dannii Willis.
Include Glk Object Recovery by Dannii Willis.
Include Glulx Definitions by Dannii Willis.
Include Glulx Entry Points by Emily Short.
Include Glulx Text Effects by Emily Short.
Include Flexible Windows by Jon Ingold.
Include Hyperlinks by Kerkerkruip.

The side window is a text buffer g-window spawned by the main window.
The position of the side window is g-placeright.
The measurement of the side window is 30.
Rule for refreshing the side window:
try taking inventory.

When play begins:
open the side window.

Every turn:
refresh the side window.

The Study is a room. In the study is an old oak desk. On the desk is a Parker pen, a letter, an envelope and twenty dollars.

After printing the name of the envelope:
say " ( [link 1]drop[end link] )";

Table of Glulx Hyperlink Replacement Commands (continued)
link ID replacement
1 “drop envelope”[/code]

The response I get is an error in Glk Events:

When I remove Glk Events from the includes, it compiles; however, the links are not clickable. They appear underlined in blue; and the cursor turns into a hand; but nothing happens when I click on them.

It seems that Glk Events and Glulx Definitions do not play nice together. I’m pretty sure I have the versions that were posted, but they do not compile together.

The extensions must be in the wrong order. Remove all the include statements except for Flexible Windows and Hyperlinks, and then they will include each other in the correct order. (A bug report has been raised about this previously but unfortunately it was declined.)

I’ve updated Hyperlinks to work - please download and use this one: github.com/i7/extensions/blob/m … rlinks.i7x
It’s not perfect (there’s an extra line break) but it should work, and hopefully by the time your story is ready to be published we’ll have ironed out the rest of the bugs.

Hey, that works! Awesome!

Thanks so much. I’ve been banging my head against this for quite a while now. No combination of extensions seemed to work.

I’ve taken on this same problem. A nearly decade old story has this kind of layout, and I started a new posting to try to draw attention to the broken / troubled extensions and how to reproduce it. 5-window interface of Dead Cities by Jon Ingold, on Inform 76M62 Help! 5-window interface of Dead Cities by Jon Ingold, 6M62 - #3 by allensocket Please help out!