|
poploco Beginner
Joined: 14 Oct 2003 Posts: 18 Location: Canada
|
Posted: Tue Oct 14, 2003 4:57 pm
mxp / HTML |
Is there a way to set zmud 6.62 to be able to have http links be clickable...?
Example....
I'm on X mud... chatting with people on the chat channel... and someone chats... "Chat: Oh my! Look at http://www.something.something "
You would go and just click on the http address and it would act as a link and open a web browser to that page...
I mean... Tinyfuge is primitive... but it can do it. Is there a way to make it work with Zmud 6.62
Poploco
[?] |
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
Posted: Tue Oct 14, 2003 5:36 pm |
Something like this should work okay.
[code]#TRIGGER {({http|ftp|telnet}://%*{.com|.net|.org})} {#SUBSTITUTE {~<A "%1">%1~</A>}}[code]
If you want to allow for ip addresses in the URL, you'd probably be better off with a second trigger like this.
[code]#TRIGGER {({http|ftp|telnet}://%d.%d.%d.%d)} {#SUBSTITUTE {~<A "%1">%1~</A>}}[/code] |
|
|
|
poploco Beginner
Joined: 14 Oct 2003 Posts: 18 Location: Canada
|
Posted: Tue Oct 14, 2003 6:42 pm |
thanks! It works!
|
|
|
|
StackAdder Wanderer
Joined: 30 Sep 2003 Posts: 77 Location: United Kingdom
|
Posted: Tue Oct 14, 2003 7:38 pm |
Ummm what about .co.* or .gov.* or .ac.*
As you can't use wild cards in the {blah|blah2} construct do you have to rewrite the trigger pattern as a regular expression or is there a way of doing it in ZMud?
And that trigger matches white spaces in the url which I suspect may cause some confusion in use (not that there is ever time to click on anything when I am playing a mud cos it scrolls so fast - Hey Zugg, how about slowing that scroll rate down? <grin>) |
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Tue Oct 14, 2003 8:28 pm |
If somebody gets a completed set of triggers to capture all possible links, could you post it on the finished scripts forum. I think this would be very usefull to a lot of people.
|
|
|
|
Carabas GURU
Joined: 28 Sep 2000 Posts: 434 Location: USA
|
|
|
|
StackAdder Wanderer
Joined: 30 Sep 2003 Posts: 77 Location: United Kingdom
|
Posted: Wed Oct 15, 2003 11:44 am |
Doh oh yeah %x (I played around with various patterns and forgot about %x too)
Cool stuff, thanks Carabas. |
|
|
|
poploco Beginner
Joined: 14 Oct 2003 Posts: 18 Location: Canada
|
Posted: Thu Oct 16, 2003 6:31 am |
Cool works better now. Thanks dudes and dudets!
|
|
|
|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Thu Jan 08, 2004 12:13 pm |
What about a version of this trigger that will capture an email address and spit it out as a mailto link?
|
|
|
|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Fri Jan 09, 2004 11:19 am |
*bump* I'm still having trouble figuring this out. Anyone have any suggestions?
Also, I seem to be having an error with this trigger. I loaded the most recent version (#TRIGGER {({http|ftp|telnet}://%x)} {#SUBSTITUTE {~<A "%1">%1~</A>}}), and now all of my text is underlined. There's also no actual link in the test that I made. I simply imported the trigger, then did the following:
say http://www.yahoo.com/
My own actual input to the mud was underlined as a link, but when the mud spit back with "You say '", I got a bit confused. Now, everything the mud sends to me, and everything I send to the mud is underlined. Any suggestions? |
|
|
|
musishun00 Wanderer
Joined: 16 Dec 2003 Posts: 77 Location: USA
|
Posted: Fri Jan 09, 2004 11:26 am |
UPDATE:
When I close zMUD and re-open it, the text has returned to normal. So I'm guessing there's just something funky going on with the MXP that makes it want to keep underlining everything. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Fri Jan 09, 2004 12:31 pm |
This might work, Musish:
#trigger {(%x)~@(%x)} {#SUBSTITUTE {~<A "mailto: %1~@%2">%1~@%2~</A>}}
Same deal with the URL trigger, except it also needs a space in front of the Email address and at the end. |
|
|
|
mortie Wanderer
Joined: 26 Sep 2002 Posts: 73 Location: United Kingdom
|
Posted: Fri Jan 30, 2004 3:57 pm |
Hi,
I was looking over past posts and found this one useful.
I added the trigger and it works fine on its own. However, i do a lot of capturing to different windows. I found that the substitution doesnt carry over to the captured window. Any advice?
thanks
ps i found a work around or maybe this is the only way.
I added the trigger to the capture windows settings file
and it works that way. Although i would like to keep everything to the main mudfile. |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Sun Apr 11, 2004 5:57 am |
mortie: The only way I was able to get a trigger to work when there is a possibilty of it being captured is to have it as a seperate settings file for the other window.
Here is a head scratcher, that is making me bald
Using the trigger
#TRIGGER {({http|ftp|telnet}://%x')} {#SUBSTITUTE {~<A "%1">%1~</A>}}
(the ' in the trigger is for URLs that are ended with a ' like how muds do it Ratalon says 'URL')
So that being said a URL that has a ~ in it does FUNKY things
In order to pass http://pics.bla.com/~user/pics
The URL must be entered as http://pics.bla.com/~~user/pics
(The second tilde makes the first tilde show up)
The URL that the MXP trigger sends people to http://pics.bla.com/user/pics&&http://pics.bla.com/user/pics'
IF the #TRIGGER {({http|ftp|telnet}://%x)} {#SUBSTITUTE {~<A "%1">%1~</A>}}
(this one doesn't have the ' in it)
then clicking on the link removes the tilde.
In order for the link to work There has to be 2 tildes in the MXP link.
I have been messing with the trigger, but it only seems to get worse before it gets better.
Any ideas? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Sun Apr 11, 2004 10:53 am |
If you dont mind it automatically opening a web browser try:
#TRIGGER {({http|ftp|telnet}://%x)} {#URL %1} |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Apr 11, 2004 5:02 pm |
Okay after months of Accumulated studying I have come up with this *thanks all the various forum contributors for some of the Ideas
#TRIGGER {(%q)({http|ftp|telnet}://%x)(%q)} {#SUBSTITUTE {~<A '%quote(%2)'>%1%2%3~</A>}}
This one works 100% for me (at least works for everything on this post I tested it against)
works with ~, Begining, End, and Middle of sentance etc. Just won't match ftp://user:pass@192.168.1.1 kind of lines.
#trigger {(%q)(%x)~@(%x)(%q)} {#SUBSTITUTE {~<A 'mailto: %quote(%2)~@%quote(%3)'>%1%2~@%3%4~</A>}}
Same as URL but for Mailto-Links
Also since it has been Recomended I guess I will Cross post this to Finished Scripts in about a week (to make sure all quirks are out)
*ponders changing his Sig line to "Has yet to find something zMud can't do" |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Sun Apr 11, 2004 8:37 pm |
Nexela: that trigger is MOST excelent!
I have sadly managed to break it :-(
IF a single line has 2 links in it.. and EACH link has a tilde(~) in the URL.
says 'haha http://d.com/~ch and http://d.com/~ch'
It EATS the second tilde (it must parse it away on the first sweep or something)
As long as thoes EXACT conditions are not met, everything is clean and serene.
(this trigger SO belongs in the MXP help file, its the coolest part) |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sun Apr 11, 2004 10:04 pm |
NOOO!!!!! *rofl* *reminds himself to SAVE often*
I was working on this trying to find a fix and did something that totaly fried Zmud and of course the other script I was working on wasn't saved...... |
|
|
|
snoop Newbie
Joined: 21 Feb 2004 Posts: 9 Location: Sweden
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri May 14, 2004 11:32 pm |
Those are special characters, the tilde will be next to impossible to keep. You might try working around the problem by using multiple #PSUBs and matching blank spots before and after the link. Working off Nexela's last post to give you an example of what I mean:
#TRIGGER {(%q)()({http|ftp|telnet}://%x)()(%q)} {#PSUB "<A '" %x2;#PSUB "'>%3</A>" %x4}
I have no idea how well that will work just a concept item. |
|
|
|
nexela Wizard
Joined: 15 Jan 2002 Posts: 1644 Location: USA
|
Posted: Sat May 15, 2004 12:13 am |
As far as I can tell when YOU send it ie say tell etc you have to be sure to quote all the special chars with your current Quote char as zmud parses the line as its send then does the %quote.
But recieving them from a source sending them correctly should work correctly even though I wasn't able to completly test it but Il see what I can do |
|
|
|
|
|