mIRC Home    About    Download    Register    News    Help

Print Thread
#39969 06/08/03 01:41 AM
Joined: Dec 2002
Posts: 230
G
greeny Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Dec 2002
Posts: 230
$cb doesnt work in the on input event when pasting multiple lines.
Code:
on *:input:*:{ echo -a $cb(0) }

Last edited by greeny; 06/08/03 01:41 AM.
#39970 06/08/03 02:39 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Yes, this is because the clipboard is locked during a paste. It's also why I asked that $inpaste be added as an identifier.

If you wish to interact with the text being pasted before it gets msgd to the channel/query, I would do the following:

On *:INPUT:*:#: {
if ( $inpaste ) {
.timerPASTE 1 0 DoPaste
halt
}

Alias DoPaste {
echo -a *** Paste Detected: $cb(0) lines. Are you sure?
}


DoPaste will only be triggered once, even though the timer is set as many times as there are lines being pasted. This method allows you to halt the pasted text and check if you're about to flood the channel by accident with 500 lines of crap.

You can use /play -b <$target> <N> to play the clipboard to the channel.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#39971 06/08/03 12:04 PM
Joined: Jun 2003
Posts: 130
O
Vogon poet
Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
nice idea i like it


If only women came with popup menus and online help.

Link Copied to Clipboard