IRC+ IRCPlus.nlIRC resources & community

IRC Guides ยท Clients

Advanced mSL: dialogs

Advanced ยท about 15 min read

mIRC dialogs are custom windows with buttons, checkboxes and edit boxes โ€” useful for control panels, settings or small tools. You should already know basic mSL: mIRC scripting basics.

Define a dialog

In the Remote section (Alt+R):

dialog mini_panel {
  title "Mini panel"
  size -1 -1 160 80
  option dbu

  text "Say something:", 1, 8 10 80 10
  edit "", 2, 8 22 140 12
  button "Send to active", 3, 8 42 70 14
  button "Close", 4, 90 42 50 14, cancel
}
  • size โ€” width and height (with option dbu, units are dialog base units)
  • Controls have an ID number (2 = edit box, 3 = button)
  • cancel marks the Close button as cancel

Open the dialog

alias panel {
  dialog -m mini_panel mini_panel
}

Type /panel to open it. -m creates the dialog if needed.

Handle clicks

on *:dialog:mini_panel:sclick:3:{
  var %t = $did(mini_panel, 2)
  if (%t == $null) return
  msg $active %t
}

on *:dialog:mini_panel:sclick:4:{
  dialog -x mini_panel
}
  • sclick โ€” left click on a control
  • $did(name, id) โ€” read text from a control
  • $active โ€” current channel or query window

Tips

  • Keep IDs unique inside one dialog
  • Use dialog -x name to close
  • For lists and tables, see dialog and did in mIRC help
  • Large script packs under mIRC Scripts often include polished dialogs you can study
Related mSL basics ยท mIRC downloads