mIRC Home    About    Download    Register    News    Help

Print Thread
#130979 24/09/05 02:15 AM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
on 1:TEXT:!test:#reece: /msg $chan //echo $read(users.txt,1)

im trying to make it so when i type !test, it reads my users.txt file and prints the 1st line on the screen and it wont work :-/

any help ?

#130980 24/09/05 02:29 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
on 1:TEXT:!test:#reece: /msg $chan $read(users.txt,1)

This should work fine, just make sure the line 1 in your txt file is not blank.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#130981 24/09/05 02:38 AM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
I've already tried that and it wont work. its really annoying me. i put it in the remote of the script and i have mIRC.exe in the folder with users.txt and the first line is HELLLLLLOOOOOOOO just for a test.

#130982 24/09/05 03:20 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Make sure that you only have ONE "on 1:text:!test:#reece:" event per script file, as mirc will only process the first one.

ie, if a script has the following, only the first will work.
on 1:text:!test:#reece: /msg $chan event 1
on 1:text:!test:#reece: /msg $chan event 2

Also, i assume that somebody else is typing !test right? because most events respond only to what other people do (on input etc are for your own actions).


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
#130983 24/09/05 07:06 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:

im trying to make it so when i type !test, it reads my users.txt file


I think he wants an On *:INPUT:#reece: if ($1 == !test) { msg #reece $read(file.txt,1) }

though an alias would be better
alias !test { msg #reece $read(file.txt,1) }

Last edited by MikeChat; 24/09/05 07:08 AM.
#130984 24/09/05 08:37 AM
Joined: Sep 2005
Posts: 44
R
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2005
Posts: 44
k so id just write the alias part? or would i write both?

#130985 24/09/05 09:43 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
YOUR ON TEXT events do not trigger when YOU type text, they go off when other people type text, use a second instance of mirc to test this out in.

Ps: / and // are not needed inside script files as it is taken as granted that all lines encountered are commands etc and its also assumed that you want to evaluate all variables and identifiers (ie: //)

Pss : the //echo well display the literal text "//echo" since it is just text being sent inside a MSG command


Link Copied to Clipboard