Pro autoit giúp em với

Joined
May 10, 2013
Messages
588
Reactions
150
MR
0.096
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
 

Announcements

Today's birthdays

Forum statistics

Threads
426,395
Messages
7,176,449
Members
178,835
Latest member
baonam2018

Most viewed of week

Most viewed of week

Back
Top Bottom