Originally Posted by lastyle
Originally Posted by lastyle
Thanks, that helped me a lot.
I adjusted it a bit since i just wanted the message itself without any further information which works perfectly now.

But what i didnt figure yet, how would i save the Message only if it isnt already present in the File to prevent having duplicate entrys ?

I Meanwhile fixed that with a python script running afterwards, but there is still one thing :-)

i want to read a line from a file and then parse the text to a channel, but mirc responds with "to many arguents" in the libe where i want to check if the file exists.

var %file = d:\leechme.txt
if ($isfile(%file)) {
var %fileHandle = $file(%file, r)
var %line = $read(%fileHandle)
.close -r %fileHandle
if (%line) {
/msg #welcomechat %line
remove %file
} else {
echo -s File is empty or an error occurred while reading.
}
} else {
echo -s File does not exist.
}

Found it myself, so if somebody may need wo use that function one day...

var %file = "d:\leechme.txt"
if ($isfile(%file)) {
var %line = $read(%file)
if (%line) {
/msg #welcomechat %line
remove %file
} else {
echo -s File is empty or an error occurred while reading.
}
} else {

echo -s File does not exist.
}