mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
someone that know if its a way to prevent a user from press "SHIFT", then highligt more then one line in a @window? same with CTRL ? smile any switch i missing? or isnt it possible?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
MENU @window {
lbclick : sline $active $$1
...
... other menu items to follow as per normal
...
}

Effect is to set only the last clicked line as the (only) selected line.

Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I writing a log browser, and the problem i have, that is if someone highlight "mark" more then 1 line, then it will return a error, the code i use to identify the line are

$iif($1,&Delete $1- $+ .log):if ($?!="Are you sure you want to delete $1- $+ .log?" == $true) { .remove " $+ $dirlog $+ $1 $+ .log $+ " }

if you highlight more then 1 log, then it show all logs in the menu, but it wont erase any of them, another way is to make it so all highlighted loogs are erased, but then i need to use a loop, right?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
What your now saying doesnt matter, the code i gave FORCES the window to have only one selected line.

But yes if u had more than one highlighted, then you would need a loop, and to use $sline(@window,N) [ contents ] and $sline(@window,N).ln [ line number ], be aware that if your choice is to delete this line, then the N value does not need to be incremented to the next line, since this line well be deleted then the next line well become line N, the N value only needs to be incremented if the choice is to NOT delete the line.If u instead opted for a one off question of do u want to delete all the selected lines, Yes, then ytou can simply //dline @window $sline(@window,1).ln repeatedly, untill $sline(@window,1).ln becomes $false.


Link Copied to Clipboard