mIRC Home    About    Download    Register    News    Help

Print Thread
#94606 17/08/04 09:52 PM
M
Mars2
Mars2
M
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

#94607 17/08/04 10:35 PM
T
theRat
theRat
T
/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...

#94608 17/08/04 11:24 PM
M
Mars2
Mars2
M
Thx I will have a try.

#94609 18/08/04 01:09 AM
M
Mars2
Mars2
M
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)

#94610 18/08/04 11:08 PM
T
theRat
theRat
T
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...

Last edited by theRat; 18/08/04 11:12 PM.
#94611 19/08/04 12:13 AM
M
Mars2
Mars2
M
Thx

#94612 19/08/04 08:14 AM
I
Iori
Iori
I
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.


Link Copied to Clipboard