Hyperlink change to call functions

Posted by Poromenos on Wed 30 Apr 2003 06:15 PM — 6 posts, 14,831 views.

Greece #0
OK, the hyperlink function is great, but it has a big drawback. It can only send something to the world. If i want to invoke a function from the script/plugin, it's impossible to do so universally, because not every user uses the slash as his script character (i myself use double slashes, "//"). A better way would be if the hyperlink called a script function on click, including world.send. That way, we could do whatever we wanted with hyperlinks, such as writing special functions using a hyperlink as the event. E.g.

Sub HyperlinkClick
World.Note "Sending information to the world..."
World.Send "Some random stuff."
World.EnableTimer "RandomTimer", True
End Sub

Also, while we're at it, don't use the default "True" and "False" of the scripting engine to print stuff (look at the chat.xml plugin).
Instead of

World.Note varConnected

do this:

If varConnected Then
World.Note "True"
Else
World.Note "False"
End If

The reason for this, is that "True" and "False" are translated in the script engine. For example, "True" is translated to "Alithes" (but with different ascii characters, of course). Unless the font is greek (most fixed-width fonts aren't), garbage is printed... This means that:

World.Note True

prints "Alithes" in garbage chars.
Greece #1
Also, why is my suggestion that the MC recall feature shouldn't recall the same command multiple times not yet implemented? i even gave you the code :p
Australia Forum Administrator #2
I anticipated your first request, even before reading your post. See the release notes for 3.42 - there is a way of calling plugins from hyperlinks. The simple method just sends the command (eg. eat food) however the slightly more complex method lets a plugin do hyperlinks with a high degree of certainty that the script *in that plugin* will be called, regardless of global scripting settings.

As for the recall feature, I'll have to re-read that one.
Australia Forum Administrator #3
And as for "true" and "false" - isn't that a feature? Dates and things like vbTrue and vbFalse will come out in the local settings. Isn't that a good thing?
Australia Forum Administrator #4
OK, I give in. I made a small function in the chat.xml file and ran the booleans through that.
Greece #5
It's not a good thing, because all i see is garbage chars... How can i tell "True" from "False"? :p