mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2013
Posts: 25
R
razezar Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2013
Posts: 25
Hello.

I'm new to mIRC scripting and I am trying to convert scripts from another client/language to mIRC scripts. One thing I have noticed is there is not an 'on time' trigger, there are only event based triggers.

How would go about having a snippet of code be ran in my script every XX seconds? Is there an easy way?

Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Yes, using a timer, see /help /timer

Joined: May 2013
Posts: 25
R
razezar Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2013
Posts: 25
Ah I see now - thanks for the quick reply. How would I integrate that into a script? Would I just have the first line of the script as:

Code:
/timerTenMinutes 0 600 
{
  rest 
  of 
  code
  here
}


I want to make it do multiple lines of code.

Last edited by razezar; 03/05/13 03:59 AM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Originally Posted By: razezar
I want to make it do multiple lines of code.
To execute multiple lines, have the timer call an alias
Code:
/timerTenMinutes 0 600 myalias
alias myalias {
  rest 
  of 
  code
  here
}



Joined: May 2013
Posts: 25
R
razezar Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: May 2013
Posts: 25
Gotcha. Awesome, thank you very much grin


Link Copied to Clipboard