Answer the question
In order to leave comments, you need to log in
How to click a button in chrome via WinAPI?
It is necessary to press a specific key combination in a specific browser tab, but I ran into 2 problems:
1) How to get the HWND of exactly the open tab?
2) How to correctly send a message tab?
Wrote a simple program:
#include<stdio.h>
#include<windows.h>
int main() {
for(;;Sleep(500)) {
POINT CursorPos;
GetCursorPos(&CursorPos);
int hwnd = WindowFromPoint(CursorPos);
SendMessage(hwnd, WM_KEYDOWN, VK_LSHIFT, 0);
}
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question