mIRC Home    About    Download    Register    News    Help

Print Thread
#249569 05/12/14 07:05 AM
R
Renegaade
Renegaade
R
Hello ! I need some help on a Test Script from me

Code:
on *:TEXT:!test:#: {
  if (1 = 1) { msg $chan Test working. }
}


Code:
on *:TEXT:!test:#: {
  if ($nick isop #) { msg $chan Test cycle is now starting.
    .timerTest 0 10 add.test
  }
}

on !*:part:#:(.timerTest) off 
alias add.test {
  if (1 == 1) { write -c test.txt test }
}


This works all Fine. He write the test.txt whit test and if i delete it , he write it again in the file.

So my Timer is still working

But if i change { write -c test.txt test } to

Code:
on !*:part:#:(.timerTest) off 
alias add.test {
  if (1 == 1) { msg $chan Test }
}


I will not wrote in the Chat every 10 seconds Test.

Now my Questions what to i wrong ?


Yours sincerely,
Renegaade

B
Belhifet
Belhifet
B
Code:
on *:TEXT:!test:#: {
  if ($nick isop #) { msg $chan Test cycle is now starting.
    .timerTest 0 10 add.test $chan
  }
}
 
alias add.test {
  if (1 == 1) { msg $1 Test }
}


I don't get why the if is there. But the alias doesn't retain the channel so you have to send the channel along with the alias call.

J
JuanAm
JuanAm
J
Code:
on !*:part:#: { .timerTest off } 
alias add.test {
  if (1 == 1) { msg $chan Test }
}



R
Renegaade
Renegaade
R
Originally Posted By: Belhifet
Code:
on *:TEXT:!test:#: {
  if ($nick isop #) { msg $chan Test cycle is now starting.
    .timerTest 0 10 add.test $chan
  }
}
 
alias add.test {
  if (1 == 1) { msg $1 Test }
}


I don't get why the if is there. But the alias doesn't retain the channel so you have to send the channel along with the alias call.


Thank you my friend ! This will work perfect.

The if(1 == 1) is for me to Testing because i want that he only send this massage if the if is given. .

@JuanAm , Yours not working but if i to what Belhifet says and send $chan on the timer it will also Work
Code:
on *:TEXT:!test:#: {
  if ($nick isop #) { msg $chan Test cycle is now starting.
    .timerTest 0 10 add.test $chan
  }
}

on !*:part:#: { .timerTest off } 
alias add.test {
  if (1 == 1) { msg $1 Test }
}



Thank you very much to all! i tried it more then 2 hours to get it frown

Last edited by Renegaade; 05/12/14 12:39 PM.
J
JuanAm
JuanAm
J
Originally Posted By: Renegaade
@JuanAm , Yours not working but if i to what Belhifet says and send $chan on the timer it will also Work


I only change the parentheses for a brackets in the part envent.

I do not opined on aliases and timers, in text event.

Edit:
oops, Is True, I copied your code without modifying $chan for $1, maked by Belhifet.
I´m sorry.

Last edited by JuanAm; 05/12/14 04:20 PM. Reason: edit

Link Copied to Clipboard