mIRC Homepage

Paste delay

Posted By: Mars2

Paste delay - 17/08/04 09:52 PM

Hello,

I want to have an easy paste delay script so that mIRC delays (1,5 second between each line) if I paste more than 4 lines so that I donīt get a floodkick.

The scripts on the net are combined with others and its heavy to extract only the paste delay.

Thx for help. cool
Posted By: theRat

Re: Paste delay - 17/08/04 10:35 PM

/help on input
/help $inpaste
/help $cb
/help /play

on *:input:#: {
if ( $inpaste ) {
var %cb0 = $cb(0)
if ( %cb0 <= 4 ) {
remove paste.tmp
var %i = 1
while ( %i <= %cb0 ) {
write paste.tmp $cb(%i)
inc %i
}
play paste.tmp $target 1500
}
}
}


something along those lines, nothing tested...
Posted By: Mars2

Re: Paste delay - 17/08/04 11:24 PM

Thx I will have a try.
Posted By: Mars2

Re: Paste delay - 18/08/04 01:09 AM

It doesnīt work. It pastes the same way like before - without delay.

If I change <= 4 to => 4 it plays (with a delay of 0 ms) but the same times like lines (if 4 lines it pastes/play 4 times the 4 lines)
Posted By: theRat

Re: Paste delay - 18/08/04 11:08 PM

on *:input:#: {
if ( $inpaste ) {
var %cb0 = $cb(0)
if ( %cb0 >= 4 ) {
remove paste.tmp
var %i = 1
while ( %i <= %cb0 ) {
write paste.tmp $cb(%i)
inc %i
}
play paste.tmp 1500
halt
}
}
}

forgot halt and the <= operator should indeed be >=

try making one of your own if this doesn't still work...

edit: target of /play probably unnecessary so removed it, and it was also in wrong place...
Posted By: Mars2

Re: Paste delay - 19/08/04 12:13 AM

Thx
Posted By: Iori

Re: Paste delay - 19/08/04 08:14 AM

You could also use /play -b switch, and change the delay according to lines.

on *:input:*:{
  • if $inpaste && (# || $query($active)) {
    if !$play($active,1) { .play -b $active $iif($cb(0) > 3,1500,0) }
    halt
    }
}

This also retains clipboard formatting.
© 2022 mIRC Discussion Forums