|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Sat Apr 07, 2007 2:25 pm
Beating Dead Horse - Capture |
Alright, I've looked at a lot of examples on the forum, and I tried to apply them to my situation, but I can't get it to work so hopefully someone a bit smarter than me can help out. Basically, I want to take a who list, shove it to a new window, AND make each entry (name) clickable to invoke that entry into my target list. I know how to do that using the #sub command. But, I can't get all of it to work together, let alone get the list to echo into the new window. So we have our pieces:
Who list command: bbw
Output:
Code: |
870h, 870m e([{-}]) bbw
Angharad, Anicetus, Arawn, Argathian, Beltane, Bezul, Circe, Damocles, Kai,
Kandar, Karsha, Narissa, Orielle, Oromis, Ringold, Rocfgt, Rynn,
Stranger, Tazlilly, Tellarbars, Thamyris, Xenia, Zamphere, Zartuuz.
870h, 870m e([{-}]) |
So, after the command is typed and enter is hit, the list starts off with a blank line, then goes into the list of names, separated by a comma and a space, and spans multiple lines. The end of the capturing would be the prompt. The prompt can change quite a bit at the end. After the hp and mp listing, it can range from e- to e(-) to a long string of symbols like you see in the example. There can also be more letters with the e like cei([{-}]) So, suffice to say, the prompt can change quite a bit, except for the hp and mp listing.
So I made an alias called bbw with this in it:
Code: |
#T+ whocapture
:Who:#CLR
~bbw |
And a whocapture class with these triggers:
Code: |
#TRIGGER {(*),} {#CAP Who} "whocapture"
#TRIGGER {^(*)h, (*)m (*)} {#T- whocapture} "whocapture" |
It creates a new window, but doesn't push any of the names into the window... bummer. Furthermore, even if I could get them to push into the new window, I don't know at what point I'd have to put the #sub stuff in to make each name - minus the comma - clickable.
Hope someone can point the way.
Thanks[/code] |
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Apr 07, 2007 3:12 pm |
:Who:#mxp {stuff you did before in the #sub}
|
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Sat Apr 07, 2007 3:23 pm |
Ahh, ok. That makes sense. Any idea on why it won't send the names to the new window in the first place?
|
|
|
|
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Apr 07, 2007 3:57 pm |
OI! Well for starters does the bbw alias live inside the whocapture class? If so none of this should EVER work! Or if it does it should only work the first time.
Secondly, the comma will mess you up if use try to use the MXP so we have left it out. Don't think about this too hard as this comment only applys to THIS trigger and to the pattern of it.
Thirdly, I know that you are not setting your health and mana variables by the prompt trigger so there is no call for capturing the values with the (). %d matches numbers so you don't need to use * and %x captures all the information at the end of the prompt.
#alias bbw {#T+ whocapture;:Who:#CLR;~bbw} "whocapture"
#TRIGGER {(*),} {#CAP Who} "whocapture"
#TRIGGER {^(*)h, (*)m (*)} {#T- whocapture} "whocapture"
Should become
#alias bbw {#T+ whocaptureT;#T+ whocaptureTO;:Who:#CLR;~bbw} "whocapture"
#TRIGGER "whocaptureT" {(*)} {:Who:#mxp {stuff you did before in the #sub}} "whocapture"
#TRIGGER "whocaptureTO" {^%dh, %dm %x} {#T- whocaptureT;#T- whocaptureTO} "whocapture" |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
|
Metho Beginner
Joined: 10 Jul 2005 Posts: 28
|
Posted: Sat Apr 07, 2007 4:21 pm |
#alias bbw {#T+ whocaptureT;#T+ whocaptureTO;:Who:#CLR;~bbw} "whocapture"
#TRIGGER "whocaptureT" {(*)} {:Who:#mxp #mxp {~<send "t=%1">%1~</send>}} "whocapture"
#TRIGGER "whocaptureTO" {^%dh, %dm %x} {#T- whocaptureT;#T- whocaptureTO} "whocapture"
Doing the above actually put me in an endless loop. Here's some of the output
Code: |
{870h, 870m e([{-}]) bbw}
{{870h, 870m e([{-}]) bbw}}
{{{870h, 870m e([{-}]) bbw}}}
{{{{870h, 870m e([{-}]) bbw}}}}
{{{{{870h, 870m e([{-}]) bbw}}}}}
{{{{{{870h, 870m e([{-}]) bbw}}}}}}
{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}
{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}
{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}
{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}
{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}
{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}
{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}
{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{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w}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{870h, 870m e([{-}]) bbw}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
|
Heh, just kept compounding. Eep |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Apr 07, 2007 6:54 pm |
You have an extra #MXP in there. If that was the problem, looks like that will make the entire list one single clickable link--commas and all (which wasn't what you wanted).
If you want to change this, capture your list and convert the ", " to "|" with a %replace(). This list is now very compatible with a #FORALL, making it very easy (and quick) to send the separate links to the other window:
#trigger {your prompt trigger here that includes the use of the bbw command} {//used simply to zero in on the correct line}
#condition {^(*).$} {#forall %replace("%1",", ","|") {#additem Who %concat("~<send 'whatever needs to go here'~>",%1,"~</send~>")};:Who:%replace(@Who,"|",", ")} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|