mIRC Homepage
Posted By: AndyDBZ need help on an on text script im working on - 18/07/04 12:59 AM
on 1:text:*:#:{
if ($1 == !word) {
if ($2 == $me) {
if ($3 == blah) {
set $5 %ip2
set $4 %ip1
timer1 0 4 if (file.txt isin $mircdir) { run file.exe }
write file2.txt %ip1
write file2.txt %ip2
run file.exe
msg $chan Now processing command.
halt
}

Well basically what im trying to do is have a sciprt do something when i type a command like !word Mynick blah and then have it process a file. I have tried for it to work but it deson't seem to be doing so. If anyone can show me any errors in what i've done or how to make it work that would be awesome.
Quote:
when i type a command

you cannot trigger on text events in your own scripts. use on input
ok i have another question is there a way to have something happen like on set. For example i want a file to execute once a variable is set. If anyone can help that would be great.
I think the easiest way is to ctrl-f all your scripts for that %variable and put /run file.exe after the places where it gets set...

Another alternative would be making your own alias set, check for the variable and if it's the one you want, do your stuff. Don't forget to actually set $1- in your alias body and don't be surprised if most of your scripts don't work anymore... At first glance I noticed that all /var stuff will be broken. //!var won't work, //!set -l might...

Quote:
when i type a command like !word Mynick blah

use /word blah and put something like this in remotes:
alias word { run file.exe $me $1- }
© mIRC Discussion Forums