OmnipotentGeass Posted July 20, 2010 Share Posted July 20, 2010 (edited) Hello my question is pretty brief. When I use AutoIt the mouse is moving so how could I send mouse clicks to a minimized window with actual having to move the mouse so I can I also you use the computer as my script runs. Since, AutoIt takes over the mouse and keyboard to run my script. Thus it is preventing me from doing anything thing else while an installer runs in the background that takes quite some time to install and has numerous dialogs and options prevents me from setting up computer specific settings. Edited July 20, 2010 by OmnipotentGeass Link to comment Share on other sites More sharing options...
somdcomputerguy Posted July 20, 2010 Share Posted July 20, 2010 ControlClick - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
OmnipotentGeass Posted July 20, 2010 Author Share Posted July 20, 2010 (edited) What should I do since the buttons are not standard windows controls? Edited July 20, 2010 by OmnipotentGeass Link to comment Share on other sites More sharing options...
JohnOne Posted July 20, 2010 Share Posted July 20, 2010 What does window info tool tell you? 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...
OmnipotentGeass Posted July 22, 2010 Author Share Posted July 22, 2010 (edited) It displays basically nothing but the window title. >>>> Window <<<< Title: Installing... Class: RuntimeContentWindow Position: 128, 102 Size: 1031, 851 Style: 0x16CF0000 ExStyle: 0x00040100 Handle: 0x00020556 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 633, 412 Cursor ID: 0 Color: 0xC9BF9D >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< Edited July 22, 2010 by OmnipotentGeass Link to comment Share on other sites More sharing options...
ShawnW Posted July 22, 2010 Share Posted July 22, 2010 Sometimes ControlClick just isn't going to work. In these cases I have found that if you have a VM without VMTools installed, the mouse on the VM is independent. This way you can have a virtual machine minimized running whatever script you want. As long as the script is running from inside the VM machine you shouldn't have an issue. Link to comment Share on other sites More sharing options...
OmnipotentGeass Posted July 24, 2010 Author Share Posted July 24, 2010 Sometimes ControlClick just isn't going to work. In these cases I have found that if you have a VM without VMTools installed, the mouse on the VM is independent. This way you can have a virtual machine minimized running whatever script you want. As long as the script is running from inside the VM machine you shouldn't have an issue.That really doesn't help since I need to both things on the same computer. IS there any win API or something I can use? Link to comment Share on other sites More sharing options...
Pottery Posted July 24, 2010 Share Posted July 24, 2010 You could always just do a quick click or something, just an idea. $Pos = MouseGetPos() MouseClick('left', 10, 10) MouseMove($Pos[0], $Pos[1], 0) Link to comment Share on other sites More sharing options...
Makalele Posted July 24, 2010 Share Posted July 24, 2010 Maybe try this:expandcollapse popup;=============================================================================== ; ; Function Name: _MouseClickPlus() ; Version added: 0.1 ; Description: Sends a click to window, not entirely accurate, but works ; minimized. ; Parameter(s): $Window = Title of the window to send click to ; $Button = "left" or "right" mouse button ; $X = X coordinate ; $Y = Y coordinate ; $Clicks = Number of clicks to send ; Remarks: You MUST be in "MouseCoordMode" 0 to use this without bugs. ; Author(s): Insolence <insolence_9@yahoo.com> ; ;=============================================================================== Func _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 Func _MouseMovePlus($Window, $X = "", $Y = "") Local $WM_MOUSEMOVE = 0x0200 Local $i = 0 If $X = "" OR $Y = "" Then $MouseCoord = MouseGetPos() $X = $MouseCoord[0] $Y = $MouseCoord[1] EndIf DllCall("user32.dll", "int", "SendMessage", _ "hwnd", WinGetHandle( $Window ), _ "int", $WM_MOUSEMOVE, _ "int", 0, _ "long", _MakeLong($X, $Y)) EndFunc Func _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc 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