mIRC Homepage

Can $did return the button's ID?

Posted By: KubosKube

Can $did return the button's ID? - 28/12/19 04:17 AM

More specifically,

Can $did() return the number of the button pressed to call the function? i.e.,

dialog example {
  button "Save without Updating", 1, 135 132 130 12
  button "Save and Update", 2, 268 132 129 12, ok

on *:dialog:example:sclick:1-2: {
  <code code code, variables, stuff.>
  if ($did().whatnumberwasclicked == 2) {
    <special code>

I didn't see any identifier to match this purpose in "/help $did", so i'm either blind, or it doesn't exist yet.

Do you guys know what solutions are available?
Posted By: KubosKube

Re: Can $did return the button's ID? - 28/12/19 04:21 AM

Immediately after posting, I got the wild idea to try "$did", without parenthesis.

It worked.

I feel silly now, and I won't be upset if a mod or otherwise wants to remove this message, but I'm leaving it here in case someone else has the same question.
© 2022 mIRC Discussion Forums