mIRC Home    About    Download    Register    News    Help

Print Thread
#124359 05/07/05 09:15 AM
Joined: Jul 2005
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Jul 2005
Posts: 3
hi
how can i post every few minutes another message automatically (from a text-file) in my channel???

should work with a timer so i can choose the time between the messages.

hope you understand my horrable english *smile*

thx smile

#124360 05/07/05 09:29 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
alias mc {
  if (!$timer(mc)) {
    .timermc $1 $2  msg $active $read(file.txt,<Line Number>)
  }
}


/mc <reps> <delay>

/mc 5 60

-Andy

#124361 05/07/05 10:21 AM
Joined: Jul 2005
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Jul 2005
Posts: 3
dear andy ...

there is a problem ...
the timer don't starts with /mc .....

at next i don't know how to fill out "<line number>"

i have a textfile that looks this way:

www.link1.com (exampel-link)
www.link2.com
www.link2.com
........
.......

every link should be postet one time in the channel

Example:
timer is set do 0 50 (/mc 0 50)

after 50 secs "www.link1.com" is shown once
after another 50 secs "www.link2.com is shown once
and so on ....

if every link is shown once in channel, it should start again with
the first one ....

sorry very much ... my english is not the best and i hope this is understandable. smile

greets squeezer

#124362 05/07/05 03:26 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you can have the timer call an alias to do that
alias mc {
.timermc 0 50 postlinks
}
alias postlinks {
inc %postlinks
if (%postlinks > $lines(file.txt)) { set %postlinks 1 }
msg #yourchannel $read(file.txt,%postlinks)
}

#124363 05/07/05 06:02 PM
Joined: Jul 2005
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Jul 2005
Posts: 3
ok thx

now it works cool


Link Copied to Clipboard