d0n Posted December 28, 2007 Share Posted December 28, 2007 I was wondering if this was possible now, i came across a topic about this but when i tried the code it didn't work at all, so i was just wondering if this is doable in Autoit. i saw that there was a controlclick function in autoit, but for a game, i am not sure how to find the controls of stuff inside the game Link to comment Share on other sites More sharing options...
Bert Posted December 28, 2007 Share Posted December 28, 2007 AutoIt Info tool - The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
d0n Posted December 28, 2007 Author Share Posted December 28, 2007 i've tried that but it only gives me the class-GxWindowClassD3d, and the handle, i am not sure if you can use the handle as the control in controlclick? Link to comment Share on other sites More sharing options...
Hyflex Posted December 28, 2007 Share Posted December 28, 2007 i've tried that but it only gives me the class-GxWindowClassD3d, and the handle, i am not sure if you can use the handle as the control in controlclick?Someone made a script somewhere what does the minimised clicking, look in search and your find it Link to comment Share on other sites More sharing options...
d0n Posted December 28, 2007 Author Share Posted December 28, 2007 yes but i tried that and it doesn't work for me, many other have tried and it did not work for them either Link to comment Share on other sites More sharing options...
Achilles Posted December 29, 2007 Share Posted December 29, 2007 Could you show us the old code so we can see why it isn't working? Because if there are just a few syntax errors 'cause of the changes that have AutoIt have gone through the code could probably still be used... My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
d0n Posted December 29, 2007 Author Share Posted December 29, 2007 sure heres the code, when i try it nothing happens :S ;=============================================================================== ; ; 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 _MakeLong($LoWord,$HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc Link to comment Share on other sites More sharing options...
d0n Posted December 29, 2007 Author Share Posted December 29, 2007 bump can someone tell me if this is doable? Link to comment Share on other sites More sharing options...
Defiance Posted January 5, 2008 Share Posted January 5, 2008 I'm interested in this too please reply 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