Thanks to @robodesign for LOTS of collaboration, testing, and feedback. This is definitely a joint project.
Thanks to @just me for making TaskDialog which gave me some ideas in a few places I got stuck.
I probably won't be doing too much to update this script, but I am maintaining the AHK v2 version. Please see the following posts by other users who have contributed updated versions of this code:
User @robodesign has made another version of this library in this post.
User @warapic217 has made an updated version here.
This class replaces, enhances, and combines the Msgbox and InputBox commands. Now you have a quick and simple solution to add as many custom buttons as you want to a Msgbox. Or you can configure this to have input controls, including any combination of an Edit box, DropDownList, ComboBox, CheckBox, or ListBox. Each of these controls can be populated and have a value pre-selected. This class actually halts the current function or thread to wait for input from the user as expected by a MsgBox / InputBox command.
After the user interacts with or closes the dialog, the following properties are populated:
Code: Select all
.list row number selected in ListBox
.listText text of row number selected in Listbox
.dropList row number selected in DropDownList
.dropListText text of row number selected in DropDownList
.combo row number selected in ComboBox
.comboText text of row number selected in ComboBox
.check value of Checkbox (1 or 0 / true or false)
.button text of the button clicked
.ClassNN ClassNN of the button clicked
===========================================================================
Changes:
===========================================================================Download on GitHub