This can be useful for stopping people coming to your computer and typing in mIRC while you are away from the computer.
There is a channel sub menu, the 'Enter a security number' item will open a dialog for you to enter a security number which you will use later on. The 'Open KeyPad' item will effectively lock mIRC up preventing anyone from typing in anything on there other than the dialog. The dialog will only disappear when you click 'Go' after entering the correct number.
dialog keypad {
title "KEYPAD"
option dbu
size -1 -1 80 75
text "Enter your security number", 23, 4 1 70 10
edit "", 24, 4 9 70 10, read
button "1", 25, 4 21 23 11
button "2", 26, 28 21 23 11
button "3", 27, 52 21 23 11
button "4", 28, 4 34 23 11
button "5", 29, 28 34 23 11
button "6", 30, 52 34 23 11
button "7", 31, 4 47 23 11
button "8", 32, 28 47 23 11
button "9", 33, 52 47 23 11
button "0", 34, 15 60 23 11
button "Go", 35, 40 60 23 11, ok
}
alias keypad {
$dialog(keypad,keypad,-2)
}
on *:DIALOG:keypad:close:*: {
if (( %keypad != %keypadnum )) {
.timer -m 1 0 keypad
}
unset %keypad
}
on *:DIALOG:keypad:sclick:*: {
if (( $did isnum 25-34 )) {
did -a keypad 24 $did($did)
set %keypad $did(24)
}
if (( $did(24) != $null )) did -e keypad 35
else did -b keypad 35
}
dialog numberentry {
title "KEYPAD"
option dbu
size -1 -1 80 75
text "Choose your security number", 23, 4 1 72 10
edit "", 24, 4 9 70 10, read
button "1", 25, 4 21 23 11
button "2", 26, 28 21 23 11
button "3", 27, 52 21 23 11
button "4", 28, 4 34 23 11
button "5", 29, 28 34 23 11
button "6", 30, 52 34 23 11
button "7", 31, 4 47 23 11
button "8", 32, 28 47 23 11
button "9", 33, 52 47 23 11
button "0", 34, 15 60 23 11
button "Go", 35, 40 60 23 11, ok
}
on *:DIALOG:numberentry:sclick:*: {
if (( $did isnum 1-34 )) { did -a numberentry 24 $did($did) }
if (( $did == 35 )) {
if (( $input(Do you want your security number to be $did(numberentry,24) $+ ?,-y,Confirmation,3,4) )) {
set %keypadnum $did(numberentry,24)
}
}
if (( $did(24) != $null )) did -e numberentry 35
else did -b numberentry 35
}
alias numberentry {
$dialog(numberentry,numberentry)
}
on *:DIALOG:numberentry:init:*: {
did -b numberentry 35
}
on *:DIALOG:keypad:init:*: {
did -b keypad 35
}
menu channel {
Keypad
.Enter A Security Number:numberentry
.Open KeyPad:keypad
}