IF mouse goes off canvas errors occur
FindZach opened this issue · 5 comments
I basically have a method that uses your lib and the method drags the mouse off of the screen.
Except for when that happens and I try to grab the mouse again it gives me these warnings and stops mouse movement.
`2020-07-13 16:16:37 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:37 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:37 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:37 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:38 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:39 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:39 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:39 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:39 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:40 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:40 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:40 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:40 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:41 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:41 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:41 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:41 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:42 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:42 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:42 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:42 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:43 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:43 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:43 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:43 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:44 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:45 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:46 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:46 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:46 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:46 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:47 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
2020-07-13 16:16:47 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Re-populating movement array. Did not end up on target pixel.
2020-07-13 16:16:47 [Script] WARN c.g.j.naturalmouse.api.MouseMotion - Mouse off from step endpoint (adjustment was done) x: (22 -> 18) y: (0 -> 0)
The warnings are expected, as you move the mouse by hand it finds the cursor in unexpected state.
I can't tell you based on this why the mouse wants to go offscreen. You'll need to provide more information on the setup you have. If I had to take a blind guess then you might be using ScreenAdjustedNature instead of the default nature?
When you run SystemDiagnosis.validateMouseMovement();
does it throw any errors?
The mousemotions is under its own mouse; it's working on a jframe; I have a method that moves the mouse off the jframe; that is when this occurs.
As you said the warning is expected; but it causes my program to break as its all on the same thread.
I guess I can fork your project and make the adjustments suitable for my needs.
Thanks for the project
I think you don't need to fork. You can use multiple mousemotionfactories, one which moves the cursor within the jframe and another one, which is 'global' and is set within your whole screen. Otherwise the mousemotionfactory in the jframe prevents moving the mouse out of its set screen.
@FindZach I see you've got some Runescape related repos- We're creating an open source bot and having the same issue over at https://github.com/OSRSB if you're interested 😄
Edit: LOL I see you forked one of my projects 2 years ago. Do we know each other?