mIRC Home    About    Download    Register    News    Help

Print Thread
Messagebox if User joins #237736 29/05/12 06:47 PM
Joined: May 2012
Posts: 4
T
teccheck Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: May 2012
Posts: 4
Hello everyone.

I'm looking for a script.

I want to have a messagebox - popup if a specific user like "XYZ" joins the channel. In the box should be a text like "XYZ has join" and a button to close the box.

It would be very nice if someone could give me the script because I'm not good in scripting.

Thanks
teccheck

Re: Messagebox if User joins [Re: teccheck] #237737 29/05/12 06:59 PM
Joined: Jul 2006
Posts: 3,729
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,729
If you are looking for a specific channel too, change # to the channel name:
Code:
on !*:join:#:if ($nick == XYZ) noop $input($nick joined $chan,wo,Alert)


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Messagebox if User joins [Re: Wims] #237742 31/05/12 08:42 AM
Joined: May 2012
Posts: 4
T
teccheck Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: May 2012
Posts: 4
Thank you for your help, but your code is not working.I get a message :


$input: cannot use in an event

Re: Messagebox if User joins [Re: teccheck] #237745 31/05/12 09:59 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Try this code
Code:
on !*:join:#: { 
 if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) }
 elseif ($nick == Nick2) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) }
}

Replace Nick1 with any nick, same goes for Nick2, you can remove the second nick or add more users if you want to, just copy the last line and replace the Nick2 part. This will open a small window in the right corner of your screen.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Messagebox if User joins [Re: sparta] #237746 31/05/12 10:13 AM
Joined: May 2012
Posts: 4
T
teccheck Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: May 2012
Posts: 4
Thanks! This is very good.

Is it possible to programm it like to get a "Messagebox" like an error in windows? I use a querymanager and if someone writes me I get a box "XYZ like to have query" and a then two buttons aceppt or decline. How is this window made? It would be better to have this, becaus i would better notice it. smile

Re: Messagebox if User joins [Re: teccheck] #237747 31/05/12 10:27 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Maybe you can call a alias.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | user.joined }

alias user.joined { .echo -q $input($nick joined $chan,wo,Alert) }

If this result in the same error as befor, try use a timer with the code.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | .timeruser 1 1 user.joined }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Messagebox if User joins [Re: sparta] #237748 31/05/12 11:32 AM
Joined: May 2012
Posts: 4
T
teccheck Offline OP
Self-satisified door
OP Offline
Self-satisified door
T
Joined: May 2012
Posts: 4
Thanks very much! This one works fine!

There is a Bug, but i don't care, i putted my on text in the Alert box.

Your script doesn't recognized the $nick and $chan in the alias, it just showed " (space) joinded (space) "

But thanks for the script. Very good!

Re: Messagebox if User joins [Re: teccheck] #237749 31/05/12 11:40 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Set the values in variables, then call them with the alias.
Code:
if ($nick == Nick1) { noop $tip($nick,Join,$nick joined $chan,5,,,echo,$wid) | set %user.nick $nick | set %user.join $chan | user.joined }
alias user.joined { .echo -q $input(%user.nick joined %user.join,wo,Alert) }

Untested, but i hope it working..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }