mIRC Home    About    Download    Register    News    Help

Print Thread
Can $did return the button's ID? #266572 28/12/19 04:17 AM
Joined: Jan 2017
Posts: 57
KubosKube Offline OP
Babel fish
OP Offline
Babel fish
Joined: Jan 2017
Posts: 57
More specifically,

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

Code
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?

Re: Can $did return the button's ID? [Re: KubosKube] #266573 28/12/19 04:21 AM
Joined: Jan 2017
Posts: 57
KubosKube Offline OP
Babel fish
OP Offline
Babel fish
Joined: Jan 2017
Posts: 57

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.