Guest LAS Posted April 18, 2005 Report Share Posted April 18, 2005 Now maybe you can help me with this.. cuz I'm just starting off on LISTVIEWS and sense I havnt had any exsperince in it, I'm not sure exactly how it all works. But besides that I am able to create a list view. alias channels { if ($dialog(chan)) dialog -x chan chan | dialog -ma chan chan } dialog chan { title "Channels" size -1 -1 200 90 option dbu list 1, 0 0 200 80, size button "Join", 2, 162 80 37 10 edit "", 3, 0 80 160 10, read autohs } on *:dialog:chan:init:*:{ mdx SetMircVersion $version mdx MarkDialog $dname mdx SetControlMDX 1 ListView report nosortheader rowselect single > $view did -i $dname 1 1 headerdims 250:2 100:1 did -i $dname 1 1 headertext Topic $+ $chr(9) $+ Room list } on *:dialog:chan:sclick:1:{ if ($me ison $did(1).seltext) { .did -ra $dname 3 Your on that channel. } else { .did -ra $dname 3 Your not on that channel. } } on *:dialog:chan:sclick:2:{ .join $did(1).seltext } raw 322:*:{ if ($dialog(chan)) { .did -a chan 1 $5- $+ $chr(9) $+ $2 } } raw 323:*:{ if ($dialog(chan)) { .window -c "Channels List" } } ^ I'm not sure how to make it bring the chan up. Becuase of the topic and all the 0 0 0 +fs code comes up. Link to comment Share on other sites More sharing options...
us3rX Posted April 18, 2005 Report Share Posted April 18, 2005 either use a $gettok or $remove, but i would use the $gettok /help $gettok lol its late and i really dont feel like typing it all out. us3rX Link to comment Share on other sites More sharing options...
tidy trax Posted April 21, 2005 Report Share Posted April 21, 2005 (edited) You're missing the <dialog> parameter in SetControlMDX: mdx SetControlMDX $dname 1 ListView report nosortheader rowselect single > $view Edited April 21, 2005 by tidy trax Link to comment Share on other sites More sharing options...
Guest LAS Posted April 22, 2005 Report Share Posted April 22, 2005 Tidy I know how to do that.... What I was trying to say is how I can remove the 0000 stuff and +fs but I figured all that out now.. But thanks for the help. Link to comment Share on other sites More sharing options...
Ozzy10 Posted April 22, 2005 Report Share Posted April 22, 2005 well for starters the room name needs to be first, then the topic really as the room name is allwas one word and the topic is several , thus the topic isnt a constant amount of words if the first item was the users in room, then room name , then topic then the code to get the room name would be $gettok($did(1).seltext,10,32) if it was room then topic it would be $gettok($did(1).seltext,6,32) i would suggest you change this raw 322:*:{ if ($dialog(chan)) { .did -a chan 1 $5- $+ $chr(9) $+ $2 } } to this raw 322:*:{ if ($dialog(chan)) { .did -a chan 1 $2 $+ $chr(9) $+ $5- } } Link to comment Share on other sites More sharing options...
Guest LAS Posted April 27, 2005 Report Share Posted April 27, 2005 Ok I've been working on my Channel List. And I believe I worked it out. Though it took me a little bit of thinking. So heres the code, alias channels { if ($dialog(chan)) dialog -x chan chan | dialog -ma chan chan } dialog chan { title "Channels" size -1 -1 200 90 option dbu list 1, 0 0 200 80, size button "Join", 2, 162 80 37 10 edit "", 3, 0 80 160 10, read autohs } on *:dialog:chan:init:*:{ mdx SetMircVersion $version mdx MarkDialog $dname mdx SetControlMDX 1 ListView report nosortheader rowselect single > $view mdx SetFont $dname 1 13 500 Tahoma did -i $dname 1 1 headerdims 250:2 125:1 did -i $dname 1 1 headertext Topic $+ $chr(9) $+ Room list } on *:dialog:chan:sclick:1:{ set %room $room($did(1).seltext) if ($me ison %room) { .did -ra $dname 3 Your on that channel. } else { .did -ra $dname 3 Your not on that channel. } } on *:dialog:chan:sclick:2:{ .join %room } alias room { var %h = $chr(35) var %x = 1 var %len = $numtok($1-,32) while (%x <= %len) { var %txt = $gettok($1-,%x,32) if (%h == $left(%txt,1)) { set %r %txt } inc %x } return %r } raw 322:*:{ if ($dialog(chan)) { var %t = $strip($5-) | .did -a chan 1 %t $chr(9) $2 | haltdef } } raw 323:*:{ if ($dialog(chan)) { .window -c "Channels List" | haltdef } } Though really none of yous help. lol I still thank ya for trying, but I got it to work. Whats great about it... I did it on my own so I'm really happy. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now