$wloop()
mIRC Code
+ 0 likes
Please Register to submit score.
| Average Score | 0.0 |
| Scores Submitted | 0 |
| Date Added | Aug 05, 2007 |
| Last Updated | Aug 06, 2007 |
| Tags | function loop while |
|
|
Introduction
So I thought lets make a function which does all that in 1 line.
here it goes:
How to:
use: $wloop(-sanmcqno, -mo, -te, <file>)
1st parameter:
-s = will echo to the status window (echo -s)
-a = will echo to the active window (echo -a)
-n = will send the nick a notice (notice $nick)
-m = will notice yourself (notice $me)
-c = will messages the channel its typed on (msg #)
-q = will query msg the nick (msg $nick)
-no = this will NOT give a return, this will just read the lines ($read(foo.txt))
basicly this option can be used for people who got some txt/ini with a line like: /whois $nick
if the $wloop would read such a file with the -no parameter it will execute this line instead of putting it on your window
2nd parameter:
-m = will return a dir starting from the main dir ($mircdir). e/g mirc<4th parameter>
-o = will let you greate a dir yourself (this one doesnt automaticly start with $mircdir). This requires a full manually typed 4th parameter
3rd parameter:
-t = this will read the file from the first line to the last
-e = this will read the file from the last line to the first
4th parameter:
this is simply your file. e/g <dir>foo.txt
error notes:
if you didn't gave a valid parameter it will return an error.
the errors are echoed to the active window.
1st: Error: invalid return value
2nd: Error: invalid root dir
3rd: Error: invalid position
im simply to lazy to make a dir check but you will notice this aswell.
if you don't get any result you might consider you gave a wrong dir, perhaps try another 2nd paramter or just have a good look at the dir




