|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
can mirc display and use some sort of short dialog SIMMILIAR to $$?
but so i have some text written on it and it dont need input but just has YES/OK and NO/CANCEL
so if OK is clicked: proceed with operation...
dunno if you understand...
or i need to use dedit to make this?
IceCapped
|
|
|
|
Joined: Jun 2003
Posts: 5,024
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 5,024 |
Use $input.
You need to put this in a /timer if you use it in a script. You can type the following from the editbox to see an example: /timer 1 0 echo -a $input(example,y,blah,blah,whatever)
See /help $input for other options you can choose by choosing different letters than 'y'.
Regards,
Mentality/Chris
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
but i cant make it execute a command if YES is clicked... or can i?
IceCapped
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
v - return $ok, $yes, $no, $cancel for buttons. By default, buttons return $true or $null, same as $?. If there is an input editbox, the ok/yes buttons always return the contents of the editbox. /timer 1 0 echo -a $input(example,y,blah,blah,whatever) so add v after where Mentality put y and make an iff statement
..
if ($input(example,vy,blah,blah,whatever) == $yes) {
command
}
..
if you asking for $input in an ON event use the timer /timer 1 0 /askforinput and make an alias of the above code name /askforinput, if you want it in an alias you dont need to do a timer.
Last edited by Mpdreamz; 07/06/05 11:08 PM.
$maybe
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
thanks alot it works just 1 question here f ($input(example,vy,blah,blah,whatever) == $yes) { what does last "blah" and "whatever" do if they have no function ?
Last edited by raZOR; 07/06/05 11:33 PM.
IceCapped
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
$input(window text,e,window topbar text,input field text,unknown field)
this differes from what the help file says, I dont think the last field does anything actually.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
IceCapped
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
yay, im sorry for bothering... but here is stated "code" = $yes { do things } but how to make if pressed thing is NO to do things ? is it possible ? coz i have this:
alias something {
if ($input (blabla,vy,Title,nothing,nothing_again) == $yes) {
//set %Yes Yes
}
elseif ($input(blabla,vy,Title,nothing,nothing_again) == $no) {
//set %No No
}
}
but itz messy and when i call alias and answer NO i get this called again
IceCapped
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
multiple possable ways
alias something {
var %answer = $input(blabla,vy,Title,nothing,nothing_again)
if (%answer == $yes) {
//set %Yes Yes
}
elseif (%answer == $no) {
//set %No No
}
}
or
alias something {
if ($input(blabla,vy,Title,nothing,nothing_again) == $yes) {
//set %Yes Yes
}
elseif ($v1 == $no) {
//set %No No
}
}
$v1 & $v2 Returns the first and second parameters of "THE LAST" if-then-else comparison. Also functional in $iif and /while conditions Older versions of mirc have $ifmatch which is $v1 but itz messy and when i call alias and answer NO i get this called again [/quote]
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
this works perfect but 1 more problem LOL for this part: elseif ($ifmatch == $no) { //set %No No .did -u chekbox 105 } this with uncheking chekbox when pressed NO doesnt work... altho it should ! any ideas why it behaves like this ?
IceCapped
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
try this
elseif ($ifmatch == $no) { echo -st ENTERED THE NO CODE //set %No No .did -u chekbox 105 }
does it display that message in status window when you do NO? if so does .did -u chekbox 105 do what its ment to?
PS: "//set %No No" this doesnt need the // there obnly needed when typing commands from the mirc prompt "set %No No"
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
nope, it doesnt echo nor i get uncheked chekbox.
maybe it dont work coz itz working on mirc 6.03 ?
IceCapped
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
might be a version problem, i doubt it tho. Check to see the ELSEIF is aligned {{{ }}} correctly to the IF. If that doesnt work try the var %answer = $input option i gave.
|
|
|
|
Joined: Apr 2005
Posts: 1,009
Hoopy frood
|
OP
Hoopy frood
Joined: Apr 2005
Posts: 1,009 |
that other solution with %anwer works thanks alot ! :D:D:D:D *me happy now*
IceCapped
|
|
|
|
|