Hyperlink question

Hi,

is there a way to invoke a custom routine when clicking on a hyperlink in Tads 3?
The standard behaviour is that command line is executed with the first string.
I didn’t find anything in the documentation, so at this moment I guess that the interpreter handles this rather than the game. Am I right or did I miss something?

[code]startRoom: Room ‘Start Room’
"This is the starting room. This is <<aHref(‘Examine me<<me.x>>’, ‘me’)>>. "
;

  • me: Actor
    x() {“Hello.”;}
    ;[/code]
    Strangly enough, the test-code above prints out “Hello” in the room description, rather than triggering the function when clicked.

Since no one else has replied to this post, I thought I’d give it a try. You’ll get a cleaner output if you use a single-quoted string in your x() routine:

[code]startRoom: Room ‘Start Room’
"This is the starting room. This is <<aHref(‘<<me.x>>’, ‘me’)>>. "
;

  • me: Actor
    x() {return 'Hello. ';}[/code]
    But as to whether there’s a way to simply execute a routine rather than dropping the output onto the command line, I don’t know. Quite possibly, T3 will let you do something tricky with the output filter that will suppress this. This is way over my head, but you might want to look at OutputStream.captureOutput in the Library Reference Manual. Possibly you could customize it so as to suppress an output that would otherwise go to the command line.