VB Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim ctrlpress
Private Sub Form_Load()
Timer1.Interval = 100
End Sub
Private Sub Timer1_Timer()
For Cnt = 32 To 300
'Get the keystate of a specified key
If GetAsyncKeyState(Cnt) <> 0 Then
If Chr$(Cnt) = "ยข" Then ctrlpress = 1 'ctrl has been pressed
Exit For
End If
Next Cnt
For Cnt = 32 To 300
'Get the keystate of a specified key
If GetAsyncKeyState(Cnt) <> 0 Then
If Chr$(Cnt) = "P" And ctrlpress = 1 Then ' check if p has been pressed after
SendKeys "{BKSP}"
SendKeys "Password"
End If
Exit For
End If
Next Cnt
End Sub