mIRC Home    About    Download    Register    News    Help

Print Thread
#125860 22/07/05 07:50 PM
Joined: Jul 2005
Posts: 22
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2005
Posts: 22
Im trying to make a "help dialog" where when someone
aks a question (for example) "how can i register my nickname"
then j open my "help dialog" and press "register" button, instead of typing:
"/msg nickserv register password email" everytime

And when i press "register" button on my "help" dialog

It should be like this; (for example nick is MARIO )

MARIO, if yo want to register you nick name tupe /msg nickserv register password email

"say $$1 If you want to register your nick, type /msg nickserv register password email"

but i have a problem, when i write;

Quote:
say $$1 If you want to register your nick, type /msg nickserv register password email


The problem is ( $$1 ) when i put this command, it won't say "say $$1 If you want to register your nick, type /msg nickserv register password email"

but if i put;

Quote:
say If you want to register your nick, type /msg nickserv register password email
(without the $$1 ) then it works, but i need $$1

here is an example od my dialog;

Quote:

;boris
alias help { dialog -m help help }
dialog help {
title help
icon graph/topics.ico
size -1 -1 75 40
option dbu
button "Close",1,105 58 20 10,ok
text "HELP",2,5 5 50 7
button "Register",4,7 14 30 10
button "Identify",5,37 14 30 10
button "New Nick",8,7 24 30 10
button "SendPass",9,37 24 30 10
}

on *:dialog:help:sclick:*: {
if ($did == 4) { say $$1 If you want to register your nick, type /msg nickserv register password email
}


Does someone knowns what the problem is ?

#125861 22/07/05 08:42 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You aren't specifying a $$1 value, and because you're using double $'s, it won't execute if there is no value.

If you want a nick, you'll need to provide it... try $?="Nick" in place of that. It will require that you type the nick in, though.

Of course, unless the channel scrolls really fast (ie. lots of talking), you don't really need to give a nick... just remove $$1 and have it just say it normally.

Now, to point out... /say assumes you have a specific spot to send the message to. A dialog may not always know where /say is for. You should probably use /msg $active instead.


Invision Support
#Invision on irc.irchighway.net
#125862 22/07/05 08:47 PM
Joined: Dec 2002
Posts: 208
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 208
$1 doesn't mean anything to the on dialog event, so it is empty. The extra $ in $$1 makes mirc halt the script if $1 is empty, instead of saying anything. You need something to identify the nick -- perhaps a variable. If the nick is selected in the nicklist, you can do something like $snick($active,1) to get the 1st selected nick in the active chan.


If I knew now what I will know then... maybe things will have been different...
#125863 23/07/05 10:54 AM
Joined: Jul 2005
Posts: 22
B
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2005
Posts: 22
Thank's guys (:


Link Copied to Clipboard