Ver Mensaje Individual
  #2 (permalink)  
Antiguo 02/07/2013, 16:07
dsio392i3nkmw9d
 
Fecha de Ingreso: mayo-2012
Ubicación: un departamento
Mensajes: 15
Antigüedad: 11 años, 11 meses
Puntos: 0
Respuesta: codigo para ejecutar comandos del teclado.

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)
Sub sumirboton(boton As Long)
Call keybd_event(boton, 0, 0, 0)
Call keybd_event(boton, 0, KEYEVENTF_KEYUP, 0)
End Sub

Private Sub Command1_Click()
Call sumirboton(17 + 49)
End Sub

'17=control 49=1 50=2 51=3 52=4 53=5 54=6 32=espacio


'tiempo___________________________________________ _______________________
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Private Sub Command2_Click()
Call Sleep(1000) '1 segundo
End Sub


Adaptalo a tus necesidades saludos

Última edición por dsio392i3nkmw9d; 02/07/2013 a las 16:18