#include <WinAPI.au3>
#include <WindowsConstants.au3>
$wnd = WinGetHandle("title")
left_down($wnd, 300, 400)
Sleep(2000)
left_up($wnd, 300, 400)
Func left_down($hWnd, $X, $Y)
_WinAPI_PostMessage($hWnd, $WM_LBUTTONDOWN, 0, _WinAPI_MakeLong($X, $Y))
_WinAPI_PostMessage($hWnd, $WM_SETCURSOR, $hWnd, _WinAPI_MakeLong($HTCLIENT, $WM_LBUTTONDOWN))
EndFunc
Func left_up($hWnd, $X, $Y)
_WinAPI_PostMessage($hWnd, $WM_LBUTTONUP, 0, _WinAPI_MakeLong($X, $Y))
_WinAPI_PostMessage($hWnd, $WM_SETCURSOR, $hWnd, _WinAPI_MakeLong($HTCLIENT, $WM_LBUTTONUP))
EndFunc