(Example) #include <Constants.au3>
#include <WinAPI.au3>
_MouseClick(11, 22)
; _MouseMove(11, 22)
Func _MouseClick($x, $y)
$x = $x * 65535 / @DesktopWidth
$y = $y * 65535 / @DesktopHeight
_WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y)
_WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTDOWN), $x, $y)
_WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_LEFTUP), $x, $y)
EndFunc ;==>_MouseClick
Func _MouseMove($x, $y)
$x = $x * 65535 / @DesktopWidth
$y = $y * 65535 / @DesktopHeight
_WinAPI_Mouse_Event(BitOR($MOUSEEVENTF_ABSOLUTE, $MOUSEEVENTF_MOVE), $x, $y)
EndFunc ;==>_MouseMove _WinAPI_DrawFrameControl (Example) #include <FrameConstants.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
$hGUI = GUICreate("_WinAPI_DrawFrameControl", 400, 300)
GUISetState()
$hDC = _WinAPI_GetWindowDC($hGUI)
$tRect = DllStructCreate($tagRECT)
$ptrRect = DllStructGetPtr($tRect)
_SetPosSize($tRect, 20, 45, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $DFCS_BUTTONCHECK + $DFCS_CHECKED)
_SetPosSize($tRect, 50, 45, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $DFCS_BUTTONRADIO + $DFCS_CHECKED)
_SetPosSize($tRect, 80, 40, 32, 32)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_CAPTION, $DFCS_CAPTIONCLOSE)
Local $aState[9] = [8, $DFCS_BUTTON3STATE, $DFCS_BUTTON3STATE + $DFCS_INACTIVE, $DFCS_BUTTONCHECK, $DFCS_BUTTONPUSH, $DFCS_BUTTONPUSH + $DFCS_FLAT, $DFCS_BUTTONRADIO, $DFCS_BUTTONRADIOIMAGE, $DFCS_BUTTONRADIOMASK]
For $i = 1 To $aState[0]
_SetPosSize($tRect, $i * 25, 100, 15, 15)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_BUTTON, $aState[$i])
Next
Local $aState[6] = [5, $DFCS_CAPTIONCLOSE + $DFCS_HOT, $DFCS_CAPTIonhelp + $DFCS_PUSHED, $DFCS_CAPTIONMAX, $DFCS_CAPTIONMIN, $DFCS_CAPTIONRESTORE]
For $i = 1 To $aState[0]
_SetPosSize($tRect, $i * 25, 130, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_CAPTION, $aState[$i])
Next
Local $aState[5] = [4, $DFCS_MENUARROW + $DFCS_TRANSPARENT, $DFCS_MENUARROWRIGHT, $DFCS_MENUBULLET, $DFCS_MENUCHECK]
For $i = 1 To $aState[0]
_SetPosSize($tRect, $i * 25, 160, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_MENU, $aState[$i])
Next
Local $aState[5] = [4, $DFCS_MENUARROW + $DFCS_TRANSPARENT, $DFCS_MENUARROWRIGHT, $DFCS_MENUBULLET, $DFCS_MENUCHECK]
For $i = 1 To $aState[0]
_SetPosSize($tRect, $i * 25 + 120, 160, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_POPUPMENU, $aState[$i])
Next
Local $aState[9] = [8, $DFCS_SCROLLCOMBOBOX, $DFCS_SCROLLDOWN, $DFCS_SCROLLLEFT, $DFCS_SCROLLRIGHT, $DFCS_SCROLLSIZEGRIP, $DFCS_SCROLLSIZEGRIPRIGHT, $DFCS_SCROLLUP, $DFCS_ADJUSTRECT]
For $i = 1 To $aState[0]
_SetPosSize($tRect, $i * 25, 190, 22, 22)
_WinAPI_DrawFrameControl($hDC, $ptrRect, $DFC_SCROLL, $aState[$i])
Next
_WinAPI_ReleaseDC($hGUI, $hDC)
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
Func _SetPosSize($tRect, $x, $y, $w, $h)
DllStructSetData($tRect, "Left", $x)
DllStructSetData($tRect, "Top", $y)
DllStructSetData($tRect, "Right", $x + $w)
DllStructSetData($tRect, "Bottom", $y + $h)
EndFunc ;==>_SetPosSize