From another thread
http://forums.fivetechsupport.com/viewtopic.php?p=90269#p90269I fount the solution
It works
But there is a very big problem: after the phone call I have to restart the PC because the keypad locks.
#include "Fivewin.ch"
#define VK_LMENU 164
#define VK_A 65
STATIC oClp
FUNCTION MAIN()
LOCAL oDlg
LOCAL oBtn
LOCAL cNumber := SPACE(20)
DEFINE DIALOG oDlg
DEFINE CLIPBOARD oClp OF oDlg
@ 1, 1 GET cNumero
@ 2, 1 BUTTON oBtn PROMPT "Call"
// I perform a CTRL+C+C
oBtn:bAction = { || oClp:SetText( ALLTRIM(cNumero) ) , ;
SetStateKey( VK_CONTROL, .T. ) , ;
SetStateKey( ASC("C"), .T. ) , ;
HB_IDLESLEEP(1) , ;
SetStateKey( ASC("C"), .F. ) , ;
oClp:Clear() }
ACTIVATE DIALOG oDlg
RETURN NIL
#pragma begindump
#include <windows.h>
#include <hbapi.h>
HB_FUNC( SETSTATEKEY )
{
if( hb_parl(2) )
keybd_event( hb_parvnl(1), 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
else
keybd_event( hb_parvnl(1), 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);
}
#pragma enddump