[VB.NET] [Source] Typing on HotKey 01-25-2011, 09:28 AM
#1
This source includes Text-typing when a Hotkey is pressed.
It is an example for TypingText effect, and also Hotkey usage.
You can modify it to do a lot of different things. Have fun.
It is an example for TypingText effect, and also Hotkey usage.
You can modify it to do a lot of different things. Have fun.

Spoiler: Source
Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Integer) As Integer
Dim FnKey As Integer
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
If ListBox1.Items.Count > FnKey - 2 Then SendKeys.Send(ListBox1.Items.Item(FnKey - 1))
SendKeys.Send("{Enter}")
Catch ex As Exception
MsgBox("Unknown Error occurred" & vbCrLf & vbCrLf & ex.Message.ToString, MsgBoxStyle.Critical, "Error")
Timer2.Stop()
Timer1.Stop()
End Try
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
For i As Integer = 112 To 123
If GetAsyncKeyState(i) <> 0 Then FnKey = i - 111
Next
If FnKey >= 1 And FnKey <= 11 Then Timer2.Start()
If FnKey = 12 Then Timer2.Stop()
End Sub
Private Sub cmdStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdStart.Click
Timer1.Start()
End Sub![[Image: rytwG00.png]](http://i.imgur.com/rytwG00.png)
Redcat Revolution!

![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)