Jump to content


mousemove script ingame


  • Please log in to reply
5 replies to this topic

#1 fenix14

fenix14
  • Guests

Posted 23 May 2010 - 11:12 AM

1)
In a game I wish to move the mouse 1 pixel to the right all the time.
First problem is that it doesnt seem to move 1 pixel but more like 50 pixels. I tried turning the mouse sensitivity ingame all the way down but didnt help much.
2)
second problem is after each movement it goes instantly back to the starting possion. Instead I want it to move another x coordinate to the right everytime the loop has run.

like it goes from 400, 400 to 401, 400. then instantly back to 400, 400 then to 401, 400 etc. instead i want it to go 400, 400 to 401, 400 to 402, 400 etc.




CoordMode, Mouse, Screen


loop 
{
MouseMove, 1, 0, 100, R
sleep 200
}


#2 argneo

argneo
  • Members
  • 220 posts

Posted 27 May 2010 - 01:58 PM

Remarks
This command uses the sending method set by SendMode.

The SendPlay mode is able to successfully generate mouse events in a broader variety of games than the other modes. In addition, some applications and games may have trouble tracking the mouse if it moves too quickly. The speed parameter or SetDefaultMouseSpeed can be used to reduce the speed (in the default SendEvent mode only).

also... the problem could be in the code that you are not posting...

#3 fenix14

fenix14
  • Guests

Posted 28 May 2010 - 01:18 AM

there is no missing code ...

#4 fenix14

fenix14
  • Guests

Posted 28 May 2010 - 01:21 AM

When I right click ingame my curser is visable, then it works, but as soon as I right click again and curser is not visable then it doesnt send the mousemove..

#5 wolf_II

wolf_II
  • Members
  • 343 posts

Posted 28 May 2010 - 01:48 AM

there is no missing code ...

In that case, I can confirm that your code works as expected on my system.

In a game I wish to move the mouse 1 pixel to the right all the time


Unless there are other scripts (or tools) interfering, the game is the reason, why you would get the two problems mentioned in the fist post.

Which Game is it? Windowed or FullScreen? Any other information you want to share?

#6 argneo

argneo
  • Members
  • 220 posts

Posted 28 May 2010 - 02:16 PM

fenix14,

1) Don't double post. If you need to... edit the previous post.

2) Read my remark. The send method has several considerations when regarding games. Read about send, sendpaly, controlsend,etc...