Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: POLLITOXD en 13 Agosto 2013, 17:03 pm



Título: problemas con send key
Publicado por: POLLITOXD en 13 Agosto 2013, 17:03 pm
quiero saber cual seria la funcion o code para que la simulacion de botones
se active en el block de notas

osea cuando le doy empezar al form en el block quiero que salga las
las letras que quiero yo 
pero en ves que salga letras me sale numeros ascii
bueno sino me explique bien dejo un video aveces
vale una imagen para poder comprender mejor

http://www.youtube.com/watch?v=12PR52wF-Fw

aca dejo el ejemplo del proyecto : cree 2 comandos, 2 text , 2 timer

Código
  1. Option Explicit
  2. Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
  3.  
  4. Private Sub Form_Load()
  5. With Timer1
  6. .Enabled = False
  7. .Interval = 2000
  8. End With
  9. With Timer2
  10. .Enabled = False
  11. .Interval = 2000
  12. End With
  13. End Sub
  14. Private Sub a()
  15.  
  16.    If Timer1.Enabled = False Then
  17.        Timer1.Interval = CInt(Val(Text1.Text))
  18.        Timer1.Enabled = True
  19.        Command1.Caption = "Parar"
  20.    Else
  21.       Timer1.Enabled = False
  22.       Command1.Caption = "Empezar"
  23.    End If
  24. End Sub
  25.  
  26. Private Sub s()
  27.    If Timer2.Enabled = False Then
  28.        Timer2.Interval = CInt(Val(Text2.Text))
  29.        Timer2.Enabled = True
  30.        Command2.Caption = "Parar"
  31.    Else
  32.       Timer2.Enabled = False
  33.       Command2.Caption = "Empezar"
  34.    End If
  35. End Sub
  36. Private Sub Command1_Click()
  37. Call a
  38. End Sub
  39. Private Sub Command2_Click()
  40. Call s
  41. End Sub
  42.  
  43. Private Sub Timer1_Timer()
  44. SendKeys (vbKeya)
  45. End Sub
  46. Private Sub Timer2_Timer()
  47. SendKeys (vbKeys)
  48. End SubE

Ojalas me `puedan ayudar por hay quise meter Chr$(KeyCode) pero
no se mucho de vb apenas toy empensando


Título: Re: problemas con send key
Publicado por: DarkMatrix en 14 Agosto 2013, 04:47 am
call Sendkeys("a")


Título: Re: problemas con send key
Publicado por: Miseryk en 23 Agosto 2013, 12:24 pm
SendMessage, SendInput, etc.