mIRC Home    About    Download    Register    News    Help

Print Thread
#200745 11/06/08 01:30 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
; 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


TheWarlock #200746 11/06/08 01:36 AM
Joined: Aug 2003
Posts: 144
M
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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

Miguel_A #200747 11/06/08 01:39 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
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

TheWarlock #200748 11/06/08 01:50 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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)

Last edited by Horstl; 11/06/08 02:02 AM.
TheWarlock #200749 11/06/08 02:02 AM
Joined: Aug 2003
Posts: 144
M
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
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...

Last edited by Miguel_A; 11/06/08 02:17 AM.
Miguel_A #200750 11/06/08 02:09 AM
Joined: Nov 2007
Posts: 117
T
Vogon poet
OP Offline
Vogon poet
T
Joined: Nov 2007
Posts: 117
thnx so much


Link Copied to Clipboard