Is there any way to check if user clicked on the webpage in Chromium browser ?
I don't need the coordinates. I just need to know if user is active.
Is there any "event" on TChromium that I could handle ?
I know that I can check mouse events in Javascript and send message from renderer process to main process and execute my code in Delphi.
But I'd like to avoid injecting any JS code in the page.
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Check "mouse clicked" event inside Chromium browser.
-
- Posts: 41
- Joined: Sun Feb 05, 2017 8:53 am
- salvadordf
- Posts: 4093
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Check "mouse clicked" event inside Chromium browser.
Hi,
Use the TChromium.OnRenderCompMsg event and add this code to intercept the Windows message for mouse clicks :
Use the TChromium.OnRenderCompMsg event and add this code to intercept the Windows message for mouse clicks :
Code: Select all
case aMessage.Msg of
WM_LBUTTONDOWN :
begin
// Your code.
end;
end;
-
- Posts: 41
- Joined: Sun Feb 05, 2017 8:53 am
Re: Check "mouse clicked" event inside Chromium browser.
As usual - quick and perfect answer. THANK YOU!
- salvadordf
- Posts: 4093
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Check "mouse clicked" event inside Chromium browser.
Thanks to you for supporting this open source project in Patreon!