Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Varios (https://www.clubdelphi.com/foros/forumdisplay.php?f=11)
-   -   Como simular algunas teclas (https://www.clubdelphi.com/foros/showthread.php?t=43133)

sergio_015 03-05-2007 02:45:55

Como simular algunas teclas
 
Bueno, he leido ya varios hilos relacionado a esto, solo q no me esta funcionando al querer "mandar" las teclas "V" y "8", no necesito el numero 8 del teclado numerico, si no la tecla q esta arriba de la U y la I jeje, uso este procedimiento:

keybd_event(VK_V, 0, 0, 0);
keybd_event(VK_V, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_8, 0, 0, 0);
keybd_event(VK_8, 0, KEYEVENTF_KEYUP, 0);

PERO NO FUNCIONA, ME MARCA ERROR PORQ NO RECONOCE EL VK_V Y VK_8, EN LA AYUDA DE DELPHI NO MANEJA ESAS OPCIONES, Y BUSQUE EN UN HILO DONDE VIENE TODAS LAS TECLAS Y PUES DEBERIA DE JALAR, ALGUIEN SABE COMO HACER QUE SE PRESIONEN ESAS TECLAS???

seoane 03-05-2007 02:52:12

Loas valores desde VK_A hasta VK_Z y desde VK_0 hasta VK_9 se corresponden con su valor ascii. Es decir:

VK_V = Ord('V')
VK_8 = Ord('8')

sergio_015 03-05-2007 19:04:57

Funciono
 
Muchas gracias, me ha funcionado!!!!


La franja horaria es GMT +2. Ahora son las 15:03:54.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi