mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2014
Posts: 335
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 335
This affects the beta versions and also the official version 7.84.

When the dialog box opens, return the text (optional).

When we place the mouse cursor in the edit box and leave it empty, clicking OK return the text (optional).
Code
alias test { dialog -m test test }

dialog test {
  title ""
  option pixels
  size -1 -1 306 95
  text "Enter the text:", 1, 14 12 280 16
  edit "", 2, 10 32 290 21, autohs optional
  button "&OK", 3, 142 65 76 23, ok default
  button "&Cancel", 4, 223 65 76 23, cancel
}
on *:dialog:test:*:*:{
  if ($devent == init) { did -f $dname 1 }
  elseif ($devent == sclick) && ($did == 3) { echo Return: $did(2) }
  elseif ($devent == edit) && ($did == 2) { echo Return: $did(2) }
}

I found this bug after encountering several variables that, when empty, contained the text (optional).

Last edited by TECO; 22/08/26 01:04 PM.

TECO
irc.PTirc.org (Co-Admin)
Joined: Dec 2002
Posts: 3,919
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 3,919
Thanks this issue has been fixed for the next version.

Joined: Jul 2014
Posts: 335
TECO Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Jul 2014
Posts: 335
It's already working as expected.

Thanks


TECO
irc.PTirc.org (Co-Admin)

Link Copied to Clipboard