Peter31 Posted May 13, 2007 Posted May 13, 2007 Hi, When I use MouseMove the mouse position returns back to it's original position when it's done. I'd like the mouse to stay at it's new position so that if I use the mouse manually it starts from it's new position. I would be grateful if anyone could help me find out how to do that.
Generator Posted May 13, 2007 Posted May 13, 2007 It does stay in it's new spot. Example: MouseMove(0,0,10) I think something wrong's with your code. Mind showing us?
Peter31 Posted May 13, 2007 Author Posted May 13, 2007 Most of this is from the help file but "TblOne()" function and the "HotKeySet("{F7}", "TblOne")" is mine. ; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F7}", "TblOne") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Func TblOne() MouseMove(10, 10) EndFunc
Peter31 Posted May 13, 2007 Author Posted May 13, 2007 Just to clarify, my code above does not work the way I want to.
Paulie Posted May 13, 2007 Posted May 13, 2007 Just to clarify, my code above does not work the way I want to.Well it does everything that i expected it to do when i tested it, so what do you want it to do that it is not doing?
poisonkiller Posted May 13, 2007 Posted May 13, 2007 Do you want it to do this: Func TblOne() $pos = MouseGetPos() MouseMove(10, 10) MouseMove($pos[0], $pos[1]) EndFunc
Peter31 Posted May 13, 2007 Author Posted May 13, 2007 (edited) Well it does everything that i expected it to do when i tested it, so what do you want it to do that it is not doing?1. I start the script.2. I move the mousepointer to the center of the screen by using the mouse manually.3. I then use F7. (and expect the mouse to be moved).4. I move the mouse manually.When I do (4) I expect the mousepointer to start from it's new position (coordinates) not from center of screen (or its position I set in (2)).It does not work when I do it. Instead it will start from the position in (2) as if the mouse was not moved at all or returned to the position set in (2). Edited May 13, 2007 by Peter31
Peter31 Posted May 13, 2007 Author Posted May 13, 2007 Looks like it could be a VMWare issue. It works on my host but not in the guest system. I need it to work in my guest system. Any ideas.
Generator Posted May 13, 2007 Posted May 13, 2007 Looks like it could be a VMWare issue.It works on my host but not in the guest system.I need it to work in my guest system. Any ideas.Are you using VMWare?
Generator Posted May 13, 2007 Posted May 13, 2007 Yes.That might be an issue. Try absolute screen coord.
Peter31 Posted May 13, 2007 Author Posted May 13, 2007 That might be an issue. Try absolute screen coord.Thanks but how do I do that?
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