Jump to content

Silo

Members
  • Posts

    171
  • Joined

  • Last visited

Posts posted by Silo

  1. Looks good, Ozzy. Only thing I'd comment on in the negative would be the advertising of the script. Seems pointless imo. There's just no need, but I always say that lol! Also, I'm not sure if the description on the right is neccessary, single click an icon and let it display a description on the bottom banner. Double click to open :)

     

    Can't wait to see more :)

  2. Please excuse the double post :)

     

    Ok, TGK, as requested...

    alias ajoin { 
      dialog $iif($dialog(favourites),-x,-mh favourites) favourites
    }
    dialog favourites {
      title "Favourites"
      size -1 -1 125 108
      option dbu
      icon $mircdir $+ Engine\ico\Default\home.ico, 0
      button "&Close", 1, 86 93 37 12, ok cancel
      list 2, 2 1 122 89, size
      check "Auto join on &connect", 3, 4 95 60 10
    }
    On *:Dialog:favourites:*click:2:{
      if (!$read(Engine/Text/favourites.txt)) faves.pop
      if (!$did(2).sel) halt 
      tokenize 32 $did($did,1)
      if ($1 == rclick) {
        .set %select.chan $remove($gettok($did($dname,2).seltext,2-7,32),+fs 0 0 0 ,    +fs)
        faves.pop
      }
      elseif ($1 == dclick) && (!$server) {
        prepare.server
      }
      elseif ($1 == dclick) {
        set -u10 %select.chan $remove($gettok($did(favourites,2).seltext,2-7,32),+fs 0 0 0 ,    +fs)
        perform.event
      }
      elseif ($1 == sclick) {
      }
    }
    On *:Dialog:favourites:sclick:3:{
      $iif($did(3).state == 1,set %a.join,unset) %a.join
    }
    On *:Dialog:favourites:init:*:{
      createMDX
      dll $mdx SetDialog $dname
      dll $mdx SetBorderStyle 2 staticedge
      dll $mdx SetBorderStyle $dname 4 clientedge
      dll $mdx SetControlMDX $dname 2 listview flatsb report single showsel rowselect grid icon > $vdll
      dll $mdx SetColor favourites background $rgb(0,0,0)
      dll $mdx SetColor $dname 2 textbg $rgb(214,67,0)
      did -i $dname 2 1 settxt color $rgb(64,0,128)
      did -i $dname 2 1 headerdims 118:1 102:2
      did -i $dname 2 1 headertext Channel $chr(9) Server
      if ($var(%a.join)) did -c $dname 3
      chan.list
    }
    alias -l perform.event {
      .join %select.chan
      align Joining %select.chan $+ ...
      if ($var(%a.join)) ajoin
    }
    alias -l chan.list {
      did -r favourites 2
      var %i = 1 
      while (%i <= $lines(Engine/Text/favourites.txt)) { 
        did -a favourites 2 $gettok($read(Engine/Text/favourites.txt,%i),1,32) $chr(9) $gettok($read(Engine/Text/favourites.txt,%i),2-,32)
        inc %i 
      } 
    }
    alias -l prepare.server {
      tokenize ($did($dname,2).text,32)
      server $gettok($read(Engine/Text/favourites.txt),2-,32)
    } 
    alias -l set.chan {
      var %channel = $input(Enter channel name,129,Add Channel)
      var %server = $input(Enter server name,129,Add Server,$server)
      write -a Engine/Text/favourites.txt %channel %server
      chan.list
    }
    alias -l rem.chan {
      if ($input(Are you sure you want to delete the channel %select.chan from your favourites list?,qcyd,Confirm)) {
        splay clear.wav
        write -dl $+ $calc($did($dname,2).sel + 1) Engine/Text/favourites.txt
       ; did -r $dname 2
      }
      chan.list
    }
    alias -l cull.list {
      if $input(Are you sure you want to delete your favourites list? $crlf $crlf $+ This process cannot be undone,wnd,Confirm)
      splay clear.wav | write -c Engine/Text/favourites.txt 
      chan.list
    }
    alias join.chan { 
      var %xx = 1
      while (%xx <= $lines(Engine/Text/favourites.txt)) {
        .join $read(Engine/Text/favourites.txt,%xx) 
        inc %xx
      }
    }
    On *:SIGNAL:*MPOPUP.*: { 
      if ($1 == 465) .list
      if ($1 == 490) set.chan
      if ($1 == 491) rem.chan
      if ($1 == 492) chan.list
      if ($1 == 493) cull.list
    }

  3. Ok, will do when I get home. Thanks for your assistance :) I remembered in the vews.dll line I had a checkbox added which I never used, so I thought that could give a false reading with the $calc + 1 . I removed it, but it's still cutting random lines :(

     

    I'll post the complete code tonight (quite embarrassing since my code is basic and messy lol)

     

    Thanks again TGK :)

  4. lol i wish it were something as simple as that :P

    dialog favourites {
      title "Favourites"
      size -1 -1 125 108
      option dbu
      icon $mircdir $+ Engine\ico\Default\home.ico, 0
      button "&Close", 1, 86 93 37 12, ok cancel
      list 2, 2 1 122 89, size
      check "Auto close on join", 3, 4 95 50 10
    }
    On *:Dialog:favourites:*click:2:{
      if (!$read(Engine/Text/favourites.txt)) faves.pop
      if (!$did(2).sel) halt 
      tokenize 32 $did($did,1)
      if ($1 == rclick) {
        .set %select.chan $remove($gettok($did(favourites,2).seltext,2-7,32),+fs 0 0 1 ,    +fs)
        faves.pop
      }
      elseif ($1 == dclick) && (!$server) {
        prepare.server
      }
      elseif ($1 == dclick) {
        set -u10 %select.chan $remove($gettok($did(favourites,2).seltext,2-7,32),+fs 0 0 1 ,    +fs)
        perform.event
      }
      elseif ($1 == sclick) {
      }
    }

  5. Hey there, you're right, the chan.list is the loop to display the .txt in the list box. Arghhhh, your code looks perfect but it's still removing the randomly, or maybe even the next selection after the one I've actually chosen.

     

    Perhaps I should mention, that when I write to the file I add two entries - var %a = $chan var %b = $server

     

    so in reality, I'm still only deleting the selected line, so I gues that isn't important to the task...

     

    Hmmm, like I mentioned, remove MDX and it's no problem lol :P

     

    I appreciate your time & help :)

     

    PS - I removed the did -r $dname line since I got a */did: invalid parameters (line 96, dialogs.mrc)* error. Since I did -r in the chan.list loop I didn't think it was needed?

    -

  6. Hi TGK, firstly, thank you for a such a swift response :) I had experimented with that version of $calc, & here's the weird thing... It doesn't delete the line plus it actually writes a file to $scriptdir with either the name of the channel or a + or -

     

    I thought maybe my mIRC was screwy so I added a fresh .exe yet it still does the same thing :|

     

    Thank you for cleaning up the $input for me too :)

     

    Any other ideas?

  7. Pretty simple question, yet it's doing my head in :notworking: Listing a .txt file in a dialog list - easy. Deleting a line with a button - easy. Deleting a line with right click popup - still no problem. Ok, so now I've thrown MDX in to the mix and it's not working to my liking.

     

    So, is this right - when using views.dll to add a header & grid etc, is one the command line? i.e - do other controls need to start at 2?

    alias -l rem.chan {
    ;;;tokenize ($did($dname,2).text,32)
      var %ohi $input(Are you sure you want to delete the channel $+ %select.chan from your favourites list?,qcyd,Confirm)
      if (%ohi == $true) splay clear.wav | write -dl $+ $readn $did($dname,2).sel $read(Engine/Text/favourites.txt)
      elseif (%ohi == $false) halt
      chan.list 
    }

     

    So, as I said, before adding MDX this would work fine. Now it deletes random lines. The input display still points to the right line, but as you can see, that's only because it's displaying a variable.

     

    I've tried using $calc( +2) wrapped around various parts of the write code, to no avail.

     

    Can someone show me the error of my ways?

     

    Thanks in advance :)

  8. Thanks, Lindrian. I ended up using var %top = $remove($11,topiclen=) as a test & it worked okay, though naturally it wont return thesame info on all servers.

     

    I can't wait to get home & disect your code, though $regex && $me == $no.frickin.idea!! lol :)

     

    Thanks again :)

  9. Well, first for the ignore you'd need to add the nick to the users file using .auser etc etc. Then, in you icon alias use something like:

     

      if ($level($address($1,1)) == ignore.nick) return <number of ignore icon>

     

    change ignore.nick to whatever you name the level associated with /ignore.

     

    For away, I use RAW 352 (though I believe ozzy & err0r etc use a hashtable these days)

     

    My code:

    RAW 352:*:{
      haltdef
      if ($left($7,1) == G) { .set %sleep. [ $+ [ $6 ] ] $6 }
      elseif ($left($7,1) == H) { .unset %sleep. [ $+ [ $6 ] ] }
      away.refresh
    }

     

    And again, in the icon alias...

      if (%sleep. [ $+ [ $1 ] ] == $1) return <number of away icon>

     

    Hope that helps :)

  10. Ahhh, yes well that's valid - I should of let the icons tell the story. I've been trying to catch the chanserv notice as a variable to tokenize the parameters to display it in my dialog list. Trouble is, since the notice spits the info out in 3+ lines I only manage to catch the last line.

     

    Can I ask how you're grabbing the info and loading it in to the list?

  11. Yeah, same here. Though wasn't that gu that's been posting SSs of his 1337 network thingy doing something similar? I like it, though I guess you could only have a few options to offer, otherwise the list would be quite large.

  12. I guess he could add a /query option to the drop list that could also have a dclick event attached to it (or all the drop down options).

     

    DXC?

     

    PS - Looks awesome - great idea. Is the MSN /away cup just a temporary icon for now?

×
×
  • Create New...