Register forum user name Search FAQ

Gammon Forum

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 ➜ Miniwindows ➜ hyperlink to open url

hyperlink to open url

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Bast   (78 posts)  Bio
Date Thu 15 Jul 2010 08:29 PM (UTC)
Message
Running into a problem that I can't seem to figure out.

I want to add a hyperlink that will open a browser from a miniwindow. I can do it easily to the output window with the Hyperlink function.

Ideas from a miniwindow?

Bast

Bast

Scripts: http://github.com/endavis
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #1 on Thu 15 Jul 2010 08:41 PM (UTC)
Message
Use WindowText() to draw the text, WindowTextWidth() to get the width of the text, WindowFontInfo() to get the height of the font, and WindowAddHotspot() to add a clickable hotspot over the text. The documentation for each is good, and it shouldn't be hard to do at all. :)

I'm not sure how to make the hotspot open a browser though, honestly. Not something I've really ever looked into.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Thu 15 Jul 2010 09:12 PM (UTC)
Message
Template:function=OpenBrowser OpenBrowser

The documentation for the OpenBrowser script function is available online. It is also in the MUSHclient help file.



I had hyperlinks in this plugin, however it just did stuff on the MUD, not open a browser:

Template:post=9664 Please see the forum thread: http://gammon.com.au/forum/?id=9664.


A combination of drawing the underlined text as in that plugin, and OpenBrowser, should do it for you.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Bast   (78 posts)  Bio
Date Reply #3 on Fri 16 Jul 2010 12:23 AM (UTC)
Message
Wow, I did not see OpenBrowser.


Thanks,
Bast

Bast

Scripts: http://github.com/endavis
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.


15,906 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.