Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Suggestions
➜ Hyperlink change to call functions
|
Hyperlink change to call functions
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Wed 30 Apr 2003 06:15 PM (UTC) |
| Message
| 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. |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #1 on Wed 30 Apr 2003 06:17 PM (UTC) |
| Message
| | 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 |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #2 on Wed 30 Apr 2003 11:51 PM (UTC) |
| Message
| 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. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Wed 30 Apr 2003 11:52 PM (UTC) |
| Message
| | 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? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #4 on Wed 30 Apr 2003 11:56 PM (UTC) |
| Message
| | OK, I give in. I made a small function in the chat.xml file and ran the booleans through that. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| Poromenos
Greece (1,037 posts) Bio
|
| Date
| Reply #5 on Thu 01 May 2003 09:26 AM (UTC) |
| Message
| | It's not a good thing, because all i see is garbage chars... How can i tell "True" from "False"? :p |
Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it! | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
14,249 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top