mike2003 Posted October 12, 2014 Posted October 12, 2014 (edited) Is it possible to record mouse movement and clicks in "client mode" of coordinates for the window? for correct work with Opt("MouseCoordMode", 2) Edited October 12, 2014 by mike2003
Moderators JLogan3o13 Posted October 12, 2014 Moderators Posted October 12, 2014 Hi, mike2003. Can you explain more about what you're trying to do? I assume you're using the AutoIt Window Info Tool, which should allow you to select the mode under Options>Coord Mode. But we find that 99% of the time there is a much easier way to manipulate the window you're interacting with, so you don't have to resort to MouseClicks, etc. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 I need something like Au3Recorder but for local coordinates. "AutoIt Window Info Tool" have no recorder. its for manual work.
Moderators JLogan3o13 Posted October 12, 2014 Moderators Posted October 12, 2014 My point was, if you explain what you're trying to do, we can probably get you there without having to use the mouse at all. Most windows should support the control commands. A screenshot of the window would be helpful "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Bert Posted October 12, 2014 Posted October 12, 2014 (edited) You are missing the point. We KNOW you want to record mouse movements. For WHAT application will you be recording the mouse movements in? The name of the application please. --------------------------------- Edit: To save the trouble, seeing you are new, and odds are you haven't read the forum rules yet, please keep in mind if what you want to do is for a game - PLEASE don't waste our time. Game automation is against forum rules. Second, giving any type of evasive answer instead of being truthful - well we won't like that for it will look like you are trying to get around forum rules in what you really want to do. So far you are being evasive. Not good. We are not trying to be mean - we are following the rules of the forum. Now if it isn't for a game and within the forum rules, then by all means continue. The name of the application please. Thanks Edited October 12, 2014 by DarthCookieMonster The Vollatran project My blog: http://www.vollysinterestingshit.com/
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 any application. alpha code: expandcollapse popup#include <Misc.au3> #include <Timers.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Local Mouse Record", 393, 344, -1, -1, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE)) $Edit1 = GUICtrlCreateEdit("", 32, 72, 329, 257);,$ES_READONLY) GUICtrlSetState(-1, $GUI_DISABLE) ;~ GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Opt("MouseCoordMode", 2) $hStarttime = _Timer_Init() $dll = DllOpen("user32.dll") HotKeySet("{ESC}", "Terminate") HotKeySet("{space}", "ClearLog") $speed = 10 $firstrun = 1 While 1 If _IsPressed("02", $dll) Then While _IsPressed("02", $dll) Sleep(50) WEnd ;~ RMouse MouseLog(02) ElseIf _IsPressed("01", $dll) Then While _IsPressed("01", $dll) Sleep(50) WEnd ;~ LMouse MouseLog(01) EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Terminate() EndSwitch WEnd Func Terminate() ClipPut(GUICtrlRead($Edit1)) DllClose($dll) Exit 0 EndFunc ;==>Terminate Func ClearLog() GUICtrlSetData($Edit1, "") EndFunc ;==>ClearLog Func MouseLog($button) If $firstrun = 1 Then $firstrun = 0 $hStarttime = _Timer_Init() PrintMessage(StringFormat('WinActivate ("%s")', WinGetTitle("[ACTIVE]"))) PrintMessage('Opt ("MouseCoordMode", 2)'&@CRLF) EndIf Local $a = MouseGetPos() PrintMessage(StringFormat("Sleep (%d)", Int(_Timer_Diff($hStarttime)))) PrintMessage(StringFormat("MouseMove (%d, %d, %d)", $a[0], $a[1], $speed)) If $button = 01 Then PrintMessage('MouseClick ("left")'&@CRLF) ElseIf $button = 02 Then PrintMessage('MouseClick ("right")'&@CRLF) EndIf $hStarttime = _Timer_Init() EndFunc ;==>MouseLog Func PrintMessage($Message) GUICtrlSetData($Edit1, $Message & @CRLF, True) EndFunc ;==>PrintMessage
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 (edited) The name of the application please. very strange questions.I've dreamed of this function on for several years.it is useful in 1000 moments! in many tasks for any application! and you are fixated on games. instead of solving problems together, we discuss how it affects the game. then close the entire AU3 project at all. potential candidate because it is dangerous! I did not ask for anything special! it's all there in au3rekorder! I just need a little differently. nothing new! Edited October 12, 2014 by mike2003
Bert Posted October 12, 2014 Posted October 12, 2014 (edited) any application. alpha code: expandcollapse popup#include <Misc.au3> #include <Timers.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1_1 = GUICreate("Local Mouse Record", 393, 344, -1, -1, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE)) $Edit1 = GUICtrlCreateEdit("", 32, 72, 329, 257);,$ES_READONLY) GUICtrlSetState(-1, $GUI_DISABLE) ;~ GUICtrlSetData(-1, "Edit1") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Opt("MouseCoordMode", 2) $hStarttime = _Timer_Init() $dll = DllOpen("user32.dll") HotKeySet("{ESC}", "Terminate") HotKeySet("{space}", "ClearLog") $speed = 10 $firstrun = 1 While 1 If _IsPressed("02", $dll) Then While _IsPressed("02", $dll) Sleep(50) WEnd ;~ RMouse MouseLog(02) ElseIf _IsPressed("01", $dll) Then While _IsPressed("01", $dll) Sleep(50) WEnd ;~ LMouse MouseLog(01) EndIf $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Terminate() EndSwitch WEnd Func Terminate() ClipPut(GUICtrlRead($Edit1)) DllClose($dll) Exit 0 EndFunc ;==>Terminate Func ClearLog() GUICtrlSetData($Edit1, "") EndFunc ;==>ClearLog Func MouseLog($button) If $firstrun = 1 Then $firstrun = 0 $hStarttime = _Timer_Init() PrintMessage(StringFormat('WinActivate ("%s")', WinGetTitle("[ACTIVE]"))) PrintMessage('Opt ("MouseCoordMode", 2)'&@CRLF) EndIf Local $a = MouseGetPos() PrintMessage(StringFormat("Sleep (%d)", Int(_Timer_Diff($hStarttime)))) PrintMessage(StringFormat("MouseMove (%d, %d, %d)", $a[0], $a[1], $speed)) If $button = 01 Then PrintMessage('MouseClick ("left")'&@CRLF) ElseIf $button = 02 Then PrintMessage('MouseClick ("right")'&@CRLF) EndIf $hStarttime = _Timer_Init() EndFunc ;==>MouseLog Func PrintMessage($Message) GUICtrlSetData($Edit1, $Message & @CRLF, True) EndFunc ;==>PrintMessage As I thought - you're avoiding the question. Sorry, your doing the same thing many have tried in asking this question in actually avoiding what you are really doing. No I do not believe you. Reporting this to a moderator. If you need the mouse position in the client window - All you really need to do to get the mouse in the client window is change the setting in the AutoItWindowInfo tool. Saying you have dreamed of this for years - I doubt that. A simple search of the forum would told you what I'm telling you. So, if you have been here for years - you know that searching the forum would have gave you the answer. So.....I call bullcrap on your intent. And this: '?do=embed' frameborder='0' data-embedContent>> You are REALLY digging a hole here.... Edited October 12, 2014 by DarthCookieMonster The Vollatran project My blog: http://www.vollysinterestingshit.com/
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 I do not understand why you shoot me my topics!it is for flood !?
Bert Posted October 12, 2014 Posted October 12, 2014 (edited) Your kidding right? Is this a joke? REALLY? It is for a game and you KNOW that is against forum rules. Are you really going to try to get us to believe it isn't? Well, you know how to do it. THE NAME OF THE APPLICATION. PUT UP OR SHUT UP. Edited October 12, 2014 by DarthCookieMonster The Vollatran project My blog: http://www.vollysinterestingshit.com/
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 you just flooder! after effects and cinema have unique GUI.
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 i don want wrote code with AutoIt Win Info with my hands for 1 hour. i only need 10 sec for record and 10 for play in cycle. it's so easy to understand!
Bert Posted October 12, 2014 Posted October 12, 2014 (edited) And yet....no name of the application. again....you REFUSE TO TELL US THE NAME OF THE APPLICATION. You can simply put a end to this and we will believe you - just give us a screenshot of the application. Otherwise, a moderator will give you a one way ticket to ban-ville. Been there, seen it, got the t-shirt and ate popcorn while the clone like you got banned. Edited October 12, 2014 by DarthCookieMonster The Vollatran project My blog: http://www.vollysinterestingshit.com/
mike2003 Posted October 12, 2014 Author Posted October 12, 2014 (edited) .no name of the application. are u crazy??? after effects and cinema have unique GUI. Edited October 12, 2014 by mike2003
Bert Posted October 12, 2014 Posted October 12, 2014 Then use OPT("MouseCoordMode",2) Seeing you gave the name of the application, this will solve your problem. The Vollatran project My blog: http://www.vollysinterestingshit.com/
Bert Posted October 12, 2014 Posted October 12, 2014 (edited) i don want wrote code with AutoIt Win Info with my hands for 1 hour. i only need 10 sec for record and 10 for play in cycle. it's so easy to understand! yep...and yet another flag saying it is for a game. You say for any application then list two. Cinema is a smartphone app. Adobe After Effects supports macros so why do you need to use an AutoIt script to do something? Edited October 12, 2014 by DarthCookieMonster The Vollatran project My blog: http://www.vollysinterestingshit.com/
Moderators Melba23 Posted October 13, 2014 Moderators Posted October 13, 2014 mike2003,This thread is going nowhere - you will not provide sensible replies and so no-one will answer you as they are all convinced you are coding for a game. Guess what happens now... 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
Recommended Posts