Death Posted December 10, 2008 Share Posted December 10, 2008 (edited) I've searched thing i could think of would go under what i want. Anyway, I'd like to know if you can like make it so you have a window open and you like hook it so. mousemove(100,100) Would move to that x,y, not the normal way. Thanks Edit: Lemme clear up. So i want the mouse to move the defined x,y in the window. Edited December 10, 2008 by Death Link to comment Share on other sites More sharing options...
rasim Posted December 10, 2008 Share Posted December 10, 2008 Example Link to comment Share on other sites More sharing options...
Death Posted December 10, 2008 Author Share Posted December 10, 2008 ExampleThanks, but not what I'm looking for. Anyone else? Link to comment Share on other sites More sharing options...
martin Posted December 10, 2008 Share Posted December 10, 2008 (edited) Thanks, but not what I'm looking for. Anyone else?It's not clear to me what you want. To move the mouse to a certain position only requires MouseMove. If it needs to be at a certain position in a window then you need the position of the window which you can get with WinGetPos. Edited December 10, 2008 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Death Posted December 11, 2008 Author Share Posted December 11, 2008 It's not clear to me what you want. To move the mouse to a certain position only requires MouseMove. If it needs to be at a certain position in a window then you need the position of the window which you can get with WinGetPos. Ok so if i were to do. mousemove(100,100) It would move the mouse out of the full screen. I want to be able to go. mousemove(100,100) And it would move to that but not from normal desktop, it would do it from the top left corner of the window specified. Link to comment Share on other sites More sharing options...
Robjong Posted December 11, 2008 Share Posted December 11, 2008 Hey, check out AutoItSetOption or Opt in the help file, anyways here is an example. #include <GUIConstantsEx.au3> AutoItSetOption("MouseCoordMode", 2) ;~ Sets the way coords are used in the mouse functions, either absolute coords or coords relative to the current active window: ;~ 0 = relative coords to the active window ;~ 1 = absolute screen coordinates (default) ;~ 2 = relative coords to the client area of the active window GUICreate('MouseMove') $hBtn = GUICtrlCreateButton("Move Mouse", 10, 10) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $hBtn MouseMove(100, 100) EndSelect WEnd Link to comment Share on other sites More sharing options...
rasim Posted December 11, 2008 Share Posted December 11, 2008 Opt("MouseCoordMode", 2) 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