Talking to your apps

Re: Talking to your apps

Postby Jimmy » Tue Apr 02, 2024 3:36 pm

Enrico Maria Giordano wrote:It should work with both 32 and 64 bit.

got it work under BCC7 32 Bit, nice :D
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Talking to your apps

Postby Armando » Tue Apr 02, 2024 5:52 pm

Hello Friends:

It works fine for me.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3229
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: Talking to your apps

Postby richard-service » Tue Apr 02, 2024 7:29 pm

Hi

It's working.
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: Talking to your apps

Postby Enrico Maria Giordano » Tue Apr 02, 2024 7:34 pm

According to my tests, the program works fine only with these compilers combinations:

- Harbour MSC32
- Harbour BCC64
- xHarbour BCC32
- xHarbour BCC64
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Talking to your apps

Postby Enrico Maria Giordano » Fri Apr 05, 2024 2:51 pm

Solved! Now it works for all compilers combinations:

Code: Select all  Expand view  RUN
#include "FiveWin.ch"

function Main()

   local oDlg, oGet, cText := Space( 30 )

   DEFINE DIALOG oDlg

   @ 1, 1 GET oGet VAR cText
   oGet:bGotFocus = { || Listen() }

   ACTIVATE DIALOG oDlg CENTERED

return nil

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>

HB_FUNC( LISTEN )
{
    INPUT inputs[4];

    ZeroMemory(inputs, sizeof(inputs));

    // Pulsación de tecla Windows
    inputs[0].type = INPUT_KEYBOARD;
    inputs[0].ki.wVk = VK_LWIN;

    // Pulsación de tecla H
    inputs[1].type = INPUT_KEYBOARD;
    inputs[1].ki.wVk = 'H';

    // Liberación de tecla H
    inputs[2].type = INPUT_KEYBOARD;
    inputs[2].ki.wVk = 'H';
    inputs[2].ki.dwFlags = KEYEVENTF_KEYUP;

    // Liberación de tecla Windows
    inputs[3].type = INPUT_KEYBOARD;
    inputs[3].ki.wVk = VK_LWIN;
    inputs[3].ki.dwFlags = KEYEVENTF_KEYUP;

    // Envía las pulsaciones de teclas
    SendInput(4, inputs, sizeof(INPUT));    
}

#pragma ENDDUMP
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Talking to your apps

Postby Antonio Linares » Fri Apr 05, 2024 3:00 pm

excellent! many thanks Enrico! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42113
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests