mr-es335 Posted 12 hours ago Posted 12 hours ago Hello, May I ask why the following works with MouseCoordMode "1", but NOT with MouseCoordMode "0" ; ----------------------------------------------- #include <AutoItConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) Opt("MouseCoordMode", 0) ; ----------------------------------------------- Global $iTimeOut = 100 ; --------------------- Global $hSAC_MAIN = "[CLASS:SAC_MAIN]" Global $hSAC_FULLMIXER = "[CLASS:SAC_FULLMIXER]" ; ----------------------------------------------- RepositionSACTracks() ; ----------------------------------------------- Func RepositionSACTracks() ViewMenuSAC() ;~ RepositionO01SAC() EndFunc ;==>RepositionSACTracks ; ----------------------------------------------- Func ViewMenuSAC() WinActivate($hSAC_MAIN) ; ----------------------------------------------- ; Select: Full Mixer View WinMenuSelectItem($hSAC_MAIN, "", "&View", "&Full Mixer") ; ----------------- ; Resize: Full Mixer View ; Select: Right edge of F Mixer ; Move: Right edge of F Mixer ControlClick($hSAC_FULLMIXER, "", "", "left", 1) ;~ Opt("MouseCoordMode", 1) MouseClickDrag($MOUSE_CLICK_LEFT, 1907, 800, 368, 424, 0) EndFunc ;==>ViewMenuSAC ; ----------------------------------------------- Notes 1) Lines 1-28 work as expected with MouseCoordMode "0" 2) However, line 30 requires line 29 to "work"! 3) The SAC Full Mixer view requires a MouseClickDrag function and NOT a MouseMove function Any assistance|advice would be greatly appreciated! mr-es335 Sentinel Music Studios
mr-es335 Posted 12 hours ago Author Posted 12 hours ago Hello, Obtained the following from a AI search: ; ----------------------------------------------- #include <AutoItConstants.au3> #include <WinAPIConv.au3> #include <SendMessage.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) Opt("MouseCoordMode", 0) ; ----------------------------------------------- Global $iTimeOut = 100 ; --------------------- Global $hSAC_MAIN = "[CLASS:SAC_MAIN]" Global $hwnd = "[CLASS:SAC_FULLMIXER]" Global $x1 = 1793 Global $y1 = 350 Global $x2 = 368 Global $y2 = 424 ; ----------------------------------------------- ControlMouseDrag($hwnd, $x1, $y1, $x2, $y2) ; ----------------------------------------------- Func ControlMouseDrag($hwnd, $x1, $y1, $x2, $y2) WinActivate($hSAC_MAIN) WinActivate($hwnd) Local $WM_LBUTTONDOWN = 0x0201 Local $WM_MOUSEMOVE = 0x0200 Local $WM_LBUTTONUP = 0x0202 ; Move to the starting position _SendMessage($hwnd, $WM_MOUSEMOVE, 0, _WinAPI_MakeLong($x1, $y1)) ; Simulate mouse down _SendMessage($hwnd, $WM_LBUTTONDOWN, 1, _WinAPI_MakeLong($x1, $y1)) ; Move to the end position _SendMessage($hwnd, $WM_MOUSEMOVE, 1, _WinAPI_MakeLong($x2, $y2)) ; Simulate mouse up _SendMessage($hwnd, $WM_LBUTTONUP, 0, _WinAPI_MakeLong($x2, $y2)) EndFunc ;==>ControlMouseDrag ; ----------------------------------------------- Have been unable to get the to work!! mr-es335 Sentinel Music Studios
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now