mIRC Homepage
Posted By: TheWarlock menu hint - 11/06/08 01:30 AM
; 1*

;gline removed
; la idea es que saque los gline en una ventana automaticamente

alias glist { .window -lek @Glines 600 600 400 400 }

menu @glines {
agarrar:
.set %Line 1
:line
..gline: /gline - $+ $sline(@glines,%line)
.inc %line
.if %line > 20 { halt }
.goto line
}

raw 223:*: { .aline @glines $3 $4 }

in the menu @glines ,i want do a loop ,any suggestion?

thnx

Posted By: Miguel_A Re: menu hint - 11/06/08 01:36 AM
Originally Posted By: TheWarlock
; 1*

;gline removed
; la idea es que saque los gline en una ventana automaticamente

alias glist { .window -lek @Glines 600 600 400 400 }

menu @glines {
agarrar:
.set %Line 1
:line
..gline: /gline - $+ $sline(@glines,%line)
.inc %line
.if %line > 20 { halt }
.goto line
}

raw 223:*: { .aline @glines $3 $4 }

in the menu @glines ,i want do a loop ,any suggestion?

thnx



Hi you can´t use any off those commands in a menu...

Be more specifiw in what you want to do, i haven´t figuret out .

good luck
Posted By: TheWarlock Re: menu hint - 11/06/08 01:39 AM
the idea was , in a windows shows the stats g(GLINE)
i can erase one line , when i selected , but i want erase all the selected lines , thats why i try this

thnx
Posted By: Horstl Re: menu hint - 11/06/08 01:50 AM
I dunno how the data in your window looks like in detail, but I guess you want to do something like:
Code:
menu @glines {
  $iif(($sline($active,1)),REMOVE $sline($active,0) selected gline(s)) : {
    while ($sline($active,1)) {
      ECHO -s gline - $+ $v1
      dline $active $sline($active,1).ln 
    }
  }
}
note that I prefixed the actual gline-removal command with an "echo -s" so you can test it...
You may use token identifiers to get only the mask part of $v1 = currently processed line, e.g.: (echo -s) gline - $+ $gettok($v1,2,32)
Posted By: Miguel_A Re: menu hint - 11/06/08 02:02 AM
Originally Posted By: TheWarlock
the idea was , in a windows shows the stats g(GLINE)
i can erase one line , when i selected , but i want erase all the selected lines , thats why i try this

thnx


i have done like this...
Code:
menu @glines {
  .Remove: RemoveLines
}

alias RemoveLines {
  var %lines $sline( @glines, 0)
  var %x 1
  while ( %x <= %lines ) {
    dline @glines $sline( @glines, 1).ln
    inc %x
  }
}


it´s almost the same but i have called a alias...
Posted By: TheWarlock Re: menu hint - 11/06/08 02:09 AM
thnx so much
© mIRC Discussion Forums