mIRC Home    About    Download    Register    News    Help

Print Thread
#207212 09/12/08 09:53 PM
Joined: Dec 2008
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Dec 2008
Posts: 2
hey i am trying to learn scripting from mirc help files, now in raw events i found this

The raw event allows you to process numeric server messages that are identified only by a number, and non-numeric server messages which mIRC doesn't recognize internally.

i didn't get it, so can some one help me understanding raw events, any link to tutorial with examples will be sufficient

and some more thing i want to ask,

if nick write some thing like this 20/45 or 23*45 etc i.e. numbers are separated by any character and i don't wnat to calculate them, i want to know both numbers

how can notify a nick after a time, only once, but no of nicks can be more

how can i set a script which save hash tables to file in a timed interval

thank you for you help

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
When you get any information from the chat server it is considered an event.

If someone talks in the room, that is a TEXT event.

on *:text:*:#:{ }


If someone changes a room mode, that is a mode event.

on *:rawmode:#:{ }

If someone joins the room that is a join event.

on *:join:#:{ }

If someone leaves the room that is a part event.

on *:part:#:{ }


Raw events are other server events. For instance, when I who the channel, the information the server gives me comes on a raw event.

For /who $chan I recieve all information on raw 352.

raw 352:*:{ }

When someone sets themselves as away mIRC sees this on the raw 822 event typically. When they return I get their information on a raw 821 event.

raw 822:*:{ }
raw 821:*:{ }

In a raw event, $numeric will tell you what the raw numeric is.

raw 352:*:{ echo -a $numeric } will echo 352.

There is no $chan in a raw event. If the server provides this information you will find it in $1- or $rawmsg.

Try this out to explore raw events.

raw *:*:{
if (!$window(@raw)) { window -e @raw }
echo 12 @raw $numeric $1-
echo 3 @raw $numeric :rawmsg: $rawmsg
}



Joined: Dec 2008
Posts: 2
R
Bowl of petunias
OP Offline
Bowl of petunias
R
Joined: Dec 2008
Posts: 2
thanks for info, i will try something with raw events to understand them better
btw i still need answer to these also
Originally Posted By: rock_on09

if nick write some thing like this 20/45 or 23*45 etc i.e. numbers are separated by any character and i don't wnat to calculate them, i want to know both numbers

how can notify a nick after a time, only once, but no of nicks can be more

how can i set a script which save hash tables to file in a timed interval


Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
1) if nick write some thing like this 20/45 or 23*45 etc i.e. numbers are separated by any character and i don't wnat to calculate them, i want to know both numbers

This would require an ON TEXT event, and a number of checks to determine if it's a number or not. Possibly a regex would work for this, I'm not sure.

2) how can notify a nick after a time, only once, but no of nicks can be more

Huh? This only makes partial sense to me. Notifying a nick after a certain amount of time can be done using a timer.

See /help /timer

3) how can i set a script which save hash tables to file in a timed interval

Again, use a timer.

BTW: For more information regarding raws, you might want to take a look at http://www.mirc.net/raws


Link Copied to Clipboard