Home > other >  Call the win32 click no response
Call the win32 click no response

Time:09-24

 
The import win32api
The import win32gui
The import win32con

Def click_it (HWND, pos) :
Client_pos=win32gui. ScreenToClient (handle, pos)
TMP=win32api. MAKELONG (client_pos [0], client_pos [1])
Win32gui. SendMessage (HWND, win32con. WM_ACTIVATE, win32con WA_ACTIVE, 0)
Win32gui. SendMessage (HWND, win32con WM_MOUSEMOVE, None, TMP)
Win32gui. SendMessage (HWND, win32con. WM_LBUTTONDOWN, win32con MK_LBUTTON, TMP)
Win32gui. SendMessage (HWND, win32con. WM_LBUTTONUP, win32con MK_LBUTTON, TMP)


Click_it (f, (209877))




I need to click on the game

Using spy++ view when the mouse didn't click on the game will automatically generate WM_MOUSEMOVE WM_SETCURSOR (such as images)
Don't know whether this problem can cause can't click any solution for


CodePudding user response:

Get the window handle to confirm right? Try to modify title or moving window position effective?

CodePudding user response:

reference 1/f, ice wind of reply:
get the window handle to confirm right? Try to modify title or moving window position effective?


From the spy + + seems to only one window no child window


After my test can modify title moving window

Can use the KEYDOWN have success I reaction, click has been unable to successfully
Win32gui. PostMessage (f, win32con WM_KEYDOWN, word (' I '), 0)
Win32gui. PostMessage (f, win32con WM_KEYUP, 0)

Click on the try for a long time all can't solve
  • Related