mIRC Homepage
Posted By: Boris1234 dialog help - 22/07/05 07:50 PM
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 ?
Posted By: Riamus2 Re: dialog help - 22/07/05 08:42 PM
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.
Posted By: Hrung Re: dialog help - 22/07/05 08:47 PM
$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.
Posted By: Boris1234 Re: dialog help - 23/07/05 10:54 AM
Thank's guys (:
© mIRC Discussion Forums