KeyPad

By Callison1 on Aug 05, 2007

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
}

Comments

Sign in to comment.
guest598594   -  Oct 05, 2007

was about to say what trav said, simply hold ctrl and minimize ;)

but this is a great idea, very original, good job

suggestion: maybe replace what you click with *\'s

 Respond  
Trav   -  Aug 17, 2007

Great script man even though mirc comes with a built in password thing you just minimize mirc while clicking ctrl, but this is great \'cause you don\'t have to reset your pass each time! Gj

 Respond  
Callison1   -  Aug 06, 2007

Lol yea just a bit.

 Respond  
Olliegod   -  Aug 06, 2007

That shortened up a bit wouldn\'t you say? ;)

 Respond  
Callison1   -  Aug 06, 2007

I didn\'t think of that, updated.

I also removed a glitch where on the dialog where you choose a security number you could click X and set your security number as nothing.

 Respond  
Olliegod   -  Aug 06, 2007

You could simplify the number click events greatly by using if ($did isnum 25-34)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.