em chạy code này mà left click thì được left double click thì không được. pro nào chỉ em với
pclick(200,50,'Left Click')
Func pclick($x=0,$y=0,$button='Left Click')
$lParam = ($y * 65536) + ($x)
Switch $button
Case $button='Left Click'
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
Case $button='Left Double Click'
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDBLCLK, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
Case $button='Middle Click'
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDOWN, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
Case $button='Middle Double Click'
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDOWN, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDBLCLK, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
Case $button='Right Click'
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDOWN, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
Case $button='Right Double Click'
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDOWN, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDBLCLK, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
Case $button='Mouse Move'
_WinAPI_PostMessage($hwnd, $WM_MOUSEMOVE, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MOUSEMOVE, 0,$lParam)
EndSwitch
EndFunc
pclick(200,50,'Left Click')
Func pclick($x=0,$y=0,$button='Left Click')
$lParam = ($y * 65536) + ($x)
Switch $button
Case $button='Left Click'
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
Case $button='Left Double Click'
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDOWN, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONDBLCLK, $MK_LBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_LBUTTONUP, 0,$lParam)
Case $button='Middle Click'
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDOWN, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
Case $button='Middle Double Click'
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDOWN, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONDBLCLK, $MK_MBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MBUTTONUP, 0,$lParam)
Case $button='Right Click'
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDOWN, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
Case $button='Right Double Click'
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDOWN, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONDBLCLK, $MK_RBUTTON,$lParam)
_WinAPI_PostMessage($hwnd, $WM_RBUTTONUP, 0,$lParam)
Case $button='Mouse Move'
_WinAPI_PostMessage($hwnd, $WM_MOUSEMOVE, 0,$lParam)
_WinAPI_PostMessage($hwnd, $WM_MOUSEMOVE, 0,$lParam)
EndSwitch
EndFunc