fetush Posted November 30, 2012 Share Posted November 30, 2012 (edited) expandcollapse popupFunc cubemouse($x2,$y2,$Range,$speed) While $Range > 10 MouseMove($x2-$Range , $y2-$Range ,$speed) $pos = MouseGetPos() $poscurY = $pos[1] while $poscurY < $y2 + $Range $poscurY += 20 _MouseClickPlus("", "right", $x2-$Range, $poscurY, 1) ;~ MouseClick("right",$x2-$Range ,$poscurY,1,$speed) WEnd MouseMove($x2-$Range , $y2+$Range ,$speed) $pos = MouseGetPos() $poscurX = $pos[0] while $poscurX < $x2 + $Range $poscurX += 20 _MouseClickPlus("", "right", $poscurX, $y2+$Range, 1) ;~ MouseClick("right", $poscurX, $y2+$Range,1,$speed) WEnd MouseMove($x2+$Range , $y2+$Range ,$speed) while $poscurY > $y2 - $Range $poscurY -= 20 _MouseClickPlus("", "right", $x2+$Range, $poscurY, 1) ;~ MouseClick("right",$x2+$Range, $poscurY, 1,$speed) WEnd MouseMove($x2+$Range , $y2-$Range ,$speed) $pos = MouseGetPos() $poscurX = $pos[0] while $poscurX > $x2 - $Range + 20 $poscurX -= 20 _MouseClickPlus("", "right", $poscurX, $y2-$Range, 1) ;~ MouseClick("right",$poscurX ,$y2-$Range,1,$speed) WEnd WEnd EndFunc trying to do this for fun... what this does is just clicks mmouse in a "Square" format from middle start point. i dont get how can i make mouseclickplus work in this whole thing with mouseclick() its obvious and easy , but using mouseclickplus() its different because the mouse isnt moving with it actualy.. and there im stuck ... how can i make mouseclickplus work as it is with mouseclick() Edited November 30, 2012 by fetush Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 #bump :s Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2012 Moderators Share Posted December 3, 2012 fetush,You probably have no replies because n-one knows what MouseClickPlus is. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 ow , its just a udf used to click mouse without actualy moving your mouse around screen. should i put up the udf? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 3, 2012 Moderators Share Posted December 3, 2012 fetush, Or post a link to where you found it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 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 ;==>_MouseClickPlus Func _MakeLong($LoWord, $HiWord) Return BitOR($HiWord * 0x10000, BitAND($LoWord, 0xFFFF)) EndFunc ;==>_MakeLong this is it Link to comment Share on other sites More sharing options...
Bert Posted December 3, 2012 Share Posted December 3, 2012 Have you tried to automate the interaction with the application by its controls instead of just mouse clicking? That is MUCH more stable. Also, your OP is basically asking for how to search for a pixel on the screen then click on it. Search the forum for what you are asking for and you will find this question has been answered many times with creative solutions. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 (edited) Have you tried to automate the interaction with the application by its controls instead of just mouse clicking? That is MUCH more stable. Also, your OP is basically asking for how to search for a pixel on the screen then click on it. Search the forum for what you are asking for and you will find this question has been answered many times with creative solutions. what do u mean by thatEDIT : also in search i get only 1 result :s my thread Edited December 3, 2012 by fetush Link to comment Share on other sites More sharing options...
r2dak Posted December 3, 2012 Share Posted December 3, 2012 what do u mean by thatmaybe this http://www.autoitscript.com/autoit3/docs/tutorials/winzip/winzip.htm [center][font=comic sans ms,cursive]PEACE & LOVE[/font][/center] Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 i dont get how can that help with my cubemouse MouseClickPlus() problem Link to comment Share on other sites More sharing options...
Bert Posted December 3, 2012 Share Posted December 3, 2012 (edited) Let me make it simple for you:The issue you describe in your original post has been asked hundreds of times now in this forum. It has been answered hundreds of times in the forum.Do a search of the forum and you will find what you seek. Use "Pixelsearch Mouseclick" as your search string.------------By your other you have little knowledge of AutoIt. You post code that is advanced in design but you have no idea how to interact with a control? Did you even write any of the code you posted? Edited December 3, 2012 by scullion The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 are u suggesting me to use pixelseach ? because i dont want to use pixel seach at all but im still looking at the seach results Link to comment Share on other sites More sharing options...
Bert Posted December 3, 2012 Share Posted December 3, 2012 whatever. WHy don't you ask insolence_9@yahoo.com He wrote the bloody thing. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
fetush Posted December 3, 2012 Author Share Posted December 3, 2012 i added him but no answer and i looked through alot seach results , but nothing related to my problem. maybe im just bad at seaching forums.. 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