Sobiech Posted July 12, 2010 Share Posted July 12, 2010 (edited) I saw that Insolence function for minimized clicking wont work with simple click ( _MouseClickPlus($Window, "right"), cuz this get coord from natural mouse pos, not from minimized mode expandcollapse popupFunc _MouseClickPlus($Window, $Button = "left", $X = "", $Y = "", $Clicks = 1) Local $MK_LBUTTON = 0x0001 Local $WM_LBUTTONDOWN = 0x0201 Local $WM_LBUTTONUP = 0x0202 Local $MK_RBUTTON = 0x0002 Local $WM_RBUTTONDOWN = 0x0204 Local $WM_RBUTTONUP = 0x0205 Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 Select Case $Button = "left" $Button = $MK_LBUTTON $ButtonDown = $WM_LBUTTONDOWN $ButtonUp = $WM_LBUTTONUP Case $Button = "right" $Button = $MK_RBUTTON $ButtonDown = $WM_RBUTTONDOWN $ButtonUp = $WM_RBUTTONUP EndSelect If $X = "" OR $Y = "" Then $MouseCoord = MouseGetPos() $X = $MouseCoord[0] $Y = $MouseCoord[1] EndIf For $i = 1 to $Clicks DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonDown, _ "int", $Button, _ "long", _MakeLong($X, $Y)) DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $ButtonUp, _ "int", $Button, _ "long", _MakeLong($X, $Y)) Next EndFunc i tried to check sth with DLL Func _MouseGetPos() DllCall("user32.dll", "int short", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $GET_X_LPARAM) EndFunc but big fail this was inside windowsx.h #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) This DLL functions look very interesting, but I am too low for this, when i dont know basic functions in C++ :| I think that OPT etc. isnt enought to do this... Ah maybe this is required... I am using Win7 Ultimate 32bit Edited July 12, 2010 by Sobiech This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2010 Share Posted July 12, 2010 I'm not 100% on this, but I'm fairly sure that the mouse will not be in a minimised window to get its position, because its minimized. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Sobiech Posted July 12, 2010 Author Share Posted July 12, 2010 I solved this problem in other style, but this isnt by MousePos Maybe we can use some functions to get a mouse distance from left, and up line of window? Of from center of window (by ClientGetSize) I think that there are many ways to do it This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2010 Share Posted July 12, 2010 Im stuggling to understand what you need. As I understand it, no amount of mouse or pixel functions are going to help you to click a minimized window. Does ControlClick not work? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Sobiech Posted July 12, 2010 Author Share Posted July 12, 2010 Im stuggling to understand what you need.As I understand it, no amount of mouse or pixel functions are going to help you to click a minimized window.Does ControlClick not work?not workEg. if we get X pixels between left border and mouse, and Y pixels between Top border and mouse, then we have XY of our minimized mouseHmm but how to get pixels between left/top border and mouse if we dont know mouse pos? This require some asembler skills I think :\ This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2010 Share Posted July 12, 2010 Can you explain how you have a mouse in a minimized window? Im quite confused. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Sobiech Posted July 12, 2010 Author Share Posted July 12, 2010 I am using _MouseClickPlus() function by Insolence This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2010 Share Posted July 12, 2010 Ok but that does not mean there is a mouse cursor in the minimized window. There is no mouse in a minimized window to get the position of. Unless I am missing something. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Sobiech Posted July 12, 2010 Author Share Posted July 12, 2010 So what is in a minimized window? O_o This world is crazy Link to comment Share on other sites More sharing options...
JohnOne Posted July 12, 2010 Share Posted July 12, 2010 All the functionality is there, like your controls and such, but none of it is visually rendered, so there are no pixels. Think about this: you are at your desktop with a notepad window minimized to the taskbar, can you see your mouse? of course you can because the desktop is not minimized. When you click something minimized, you are sending a message to a control of the window, your mouse is not in that window. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
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