mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2015
Posts: 1
I
Inept Offline OP
Mostly harmless
OP Offline
Mostly harmless
I
Joined: Sep 2015
Posts: 1
Hi friends,

I have 0 programming background, but I decided to take a stab at coding a very simple script. All I want it to do is on !guess, write the rest of the line to a text file. I looked at the /write page on Wikichip, but I'm still not getting it to work.

Here's what I've got.

Quote:
on *:TEXT:!guess: {/write guess.txt $1-}


Thanks for helping this old dog learn a new trick.

Ineptly yours,
Inept

Last edited by Inept; 07/09/15 08:44 PM.
Joined: Jan 2004
Posts: 1,359
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,359
Spacing matters and you must specify which type of window: * for any window.

Code:
on *:TEXT:!guess:*:{ write guess.txt $1- }

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Further adding to Loki's reply. You should use the help files in mIRC frequently. You can access it by typing "/help" or "/help on text" to jump to a section immediately.

In the help files it shows examples and explanations as to why things are the way they are.
For instance: You can use 4 different windows.
* = All windows
? = Private message window
# = Any channel window
#Channel = #Channel specific window

Also, you'll notice something when using the working script. It will only trigger when the text is exactly "!guess". Having anything after will never trigger the script. Thus rendering $1- useless.

You can find the solution in the on text help files.
Writing $1- to the file will always include !guess btw. You might want to consider making it $2- instead smile


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard