is there a command to make the bot read an entire text file from top to bottom?
Depends what you want to do with it. Some options include /play, $read, $fread, /loadbuf, /filter. Take a look in the help file for each of them and you should have a good idea of what you need for whatever you're doing as well as the syntax to use it.
i want it to read a .txt file and relay it to the channel. /play worked great if i manually type it into the box, but when i make a command in remote tab i get "cannot play in this window" error
on *:TEXT:!howto:#trommoc: { play moccomands.txt }
Currently you're telling it to /play to whatever window is active at the time. You need to tell it to /play to the channel from which the incoming text came.
on *:TEXT:!howto:#trommoc: { play # moccomands.txt }
You might want to add a check using $play() to prevent it from being abused, such as text scrolling or flooding:
on *:TEXT:!howto:#trommoc: {
if (!$play(#)) {
.play # moccomands.txt
}
}
This way the code can only be triggered one channel per person at a time until it's finished...so you don't have the client running the code to play the text file over and over due to abuse.
now im getting this error
* /play: unable to open 'C:\Documents and Settings\Marc DeWitt\Desktop\mIRC\moccomands.txt' (line 419, remote.ini)
Does the moccomands.txt exist in mIRC directory? That error tells mIRC that it cannot find the text file to play. double check the spelling to make sure you haven't misspelled the file name.
Maybe just missing quotas? $qt(path to text here) ?
It's not a quotes problem. The error shows that the entire path and filename is being looked at. The file just isn't there.