Page 1 of 2

Clickable URL's

Posted: Fri Nov 26, 2010 8:58 pm
by Yetzederixx

Re: Clickable URL's

Posted: Fri Nov 26, 2010 9:05 pm
by Yetzederixx
Btw I'm lazy, you can view the discussion and final code here.

Re: Clickable URL's

Posted: Wed Feb 23, 2011 3:30 pm
by bluebaleen
I am attempting to implement this code and while the links are, indeed, made clickable, I receive the following error upon clicking the link:

Lua error:[string "openURL("http://www.test.com")"]:1: attempt to
call global 'openURL' (a nil value)

I am running: Mudlet 2.0-dev built: January 19, 2011

Any input here is greatly appreciated.

Re: Clickable URL's

Posted: Wed Feb 23, 2011 3:46 pm
by Vadi
Try changing it to openUrl

Re: Clickable URL's

Posted: Wed Feb 23, 2011 3:54 pm
by bluebaleen
That did it. Thanks!

Re: Clickable URL's

Posted: Thu Feb 24, 2011 7:40 am
by Phoenix
Is there a reason openUrl() doesn't work proper on links without the prefix? Like, it won't work with
Code: [show] | [select all] lua
openUrl("www.google.com") 
period, but it works on
Code: [show] | [select all] lua
openUrl("http://www.google.com") 
There is no error message for why it doesn't work, either. It simply doesn't open the page.

Re: Clickable URL's

Posted: Thu Feb 24, 2011 8:07 am
by Omni
Phoenix wrote:Is there a reason openUrl() doesn't work proper on links without the prefix? Like, it won't work with
Code: [show] | [select all] lua
openUrl("www.google.com") 
period, but it works on
Code: [show] | [select all] lua
openUrl("http://www.google.com") 
There is no error message for why it doesn't work, either. It simply doesn't open the page.
Both work perfectly for me.

Re: Clickable URL's

Posted: Thu Feb 24, 2011 1:48 pm
by Vadi
That behavior is OS-dependant I guess. So for safety, use http://, because the http:// protocol is how you want it to be opened with.

Re: Clickable URL's

Posted: Thu May 26, 2011 9:38 pm
by Sojik
I've improved this package so that it works for multiple urls on one line. Also if you were having problems with the colors of your links with the last package you probably won't with this one.

Re: Clickable URL's

Posted: Thu May 26, 2011 10:01 pm
by Vadi
thanks a ton