Ayuda con este codigo.

Topic created · 2 Mensajes · 1171 Visitas
  • Hola a todos, quiero hacer un programa parecido al Hot KeyBoard pero no se como hacerlo, el hot keyboard sirve para el SA:MP y lo que hace es que tu registras un texto cualquiera en una tecla, por ejepmlo al F1, cuando pulsas el F1 deberia salir lo que tu anteriormente has registrado.
    Dejo un video de como funciona:
    Youtube Video

  • Supongo que en VB debe ser sencillo de hacer, no lo se Anghios, manifiestate 😛

    EDIT:He encontrado esto no se si te servira http://www.youtube.com/watch?v=gmTm4wCgODE

    y aqui el codigo:

    Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Long) As Integer

    Private Sub Form_Load()
    Timer1.Interval = "100"
    End Sub

    Private Sub Timer1_Timer()
    If GetKeyPress(vbKeyF1) Then
    SendKeys (Text1.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF2) Then
    SendKeys (Text2.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF3) Then
    SendKeys (Text3.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF4) Then
    SendKeys (Text4.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF5) Then
    SendKeys (Text5.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF6) Then
    SendKeys (Text6.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF7) Then
    SendKeys (Text7.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF8) Then
    SendKeys (Text8.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF9) Then
    SendKeys (Text9.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF10) Then
    SendKeys (Text10.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF11) Then
    SendKeys (Text11.Text) + ("{enter}")
    End If
    If GetKeyPress(vbKeyF12) Then
    SendKeys (Text12.Text) + ("{enter}")
    End If
    End Sub