Mousemove in Minecraft
Mousemove in Minecraft
I wanted to ask how you can programm the mouse to move ingame, because on the screen it is on the same spot. Thanks for any replies
Re: Mousemove in Minecraft
OK.... I have a specific script I wrote to clear TaskBar cache after my games are closed. I use a FOV changer on a number of them and that pesky little image is left down by the time and just erks me... lol
This particular one is due to a pair of AHK.exe files that I hot-swap between during game play. For whatever reason, different vehicles respond differently to the "lean forward" key. Anyway, when the game closes, BlockInput is switched on and the mouse travels down about 4" from the RH corner of the TaskBar and slowly drags toward the clock to clear the cache. Kinda silly, but when I switch vehicles a lot, I switch AHK.exe files a lot and can end up with 10 little AHK icons along the TaskBar......
In YOUR case, change 1600 to 800 and test it out to see if it works for you.
Wanna piss a kitty off...... leave a bunch of icon cache on the TaskBar
NOTE: I have found if folders are OPEN, it may mess up how this works. For best results, minimize all folders so Desktop is clean.
Code: Select all
#IfWinActive MX Vs ATV REFLEX ahk_class MX VS ATV
WinWait, MX Vs ATV REFLEX ahk_class MX VS ATV
WinWaitClose, MX Vs ATV REFLEX ahk_class MX VS ATV
sleep, 250
BlockInput, On
SendMode, Event
MouseMove, 1600,1060,20 ;1600 is horizontal & 1060 is vertical placement. 20 is speed mouse travels (lower number is faster)
sleep, 100
SendMode, Event
MouseMove, 1845,1060,20 ;1845 is immediately to the LH side of time display on Windows Desktop
sleep, 50
SendMode, Event
MouseMove, 1000, 100
BlockInput, Off
sleep, 50
ExitApp
return
In YOUR case, change 1600 to 800 and test it out to see if it works for you.
Wanna piss a kitty off...... leave a bunch of icon cache on the TaskBar
NOTE: I have found if folders are OPEN, it may mess up how this works. For best results, minimize all folders so Desktop is clean.
Last edited by Evil-e on 04 Jan 2020, 10:08, edited 1 time in total.
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask
Re: Mousemove in Minecraft
First, thanks for your attention. I thougt this would fix it but i remember that this isnt what i want. I search for an code to move the mouse ingame, so for exampe: the charakter is looking at the ground and i want him to look at a specific spot in front of him. But when i try he is looking into the sky and spin around his head☹
Re: Mousemove in Minecraft
I copied the command but he just spin around and int the end he look up
-
- Posts: 17
- Joined: 03 Jul 2016, 10:30
Re: Mousemove in Minecraft
Can you explain more about what the problem is?
Also, what version of Minecraft is having the issue (Bedrock or Java), and do you have any mods installed?
Also, what version of Minecraft is having the issue (Bedrock or Java), and do you have any mods installed?
Re: Mousemove in Minecraft
I have no problem in generam. I only want to automize a progress where i have to click and look around. I play on the 1.8.9 on Java edition
-
- Posts: 17
- Joined: 03 Jul 2016, 10:30
Re: Mousemove in Minecraft
So, you want to automatically look somewhere and click?
I am not sure how to do that, exactly...
Out of curiosity though, what process are you trying to automate?
I am not sure how to do that, exactly...
Out of curiosity though, what process are you trying to automate?
Re: Mousemove in Minecraft
Its just some annoying work with buying and crafting
Re: Mousemove in Minecraft
@Its2Izzi I don't think you are gonna find a script that will essentially play the game for you, if I am understanding correctly. If I am understanding correctly, I don't know why you would want that... There is just no way for AHK to understand what needs to be done in game.
Theoretically, if you had an exact map or path, you could spend about a gazillion years automating the process via press of the F1 key if you really wanted. As for looking at a specific location, this has come up once before and I suppose you could program AHK to move cursor, view or weapon to a specific location, but it would be so much easier just to move the mouse.
is being kind of a dick here, sorry
Theoretically, if you had an exact map or path, you could spend about a gazillion years automating the process via press of the F1 key if you really wanted. As for looking at a specific location, this has come up once before and I suppose you could program AHK to move cursor, view or weapon to a specific location, but it would be so much easier just to move the mouse.
is being kind of a dick here, sorry
I have a bit of experience opening and sending commands to game console and CMD.exe... just ask
-
- Posts: 17
- Joined: 03 Jul 2016, 10:30
Re: Mousemove in Minecraft
What they want is way beyond my ability (I am a novice to AutoHotkey), but I remember seeing some features that might help.Evil-e wrote: ↑04 Jan 2020, 14:27@Its2Izzi I don't think you are gonna find a script that will essentially play the game for you, if I am understanding correctly. If I am understanding correctly, I don't know why you would want that... There is just no way for AHK to understand what needs to be done in game.
Theoretically, if you had an exact map or path, you could spend about a gazillion years automating the process via press of the F1 key if you really wanted. As for looking at a specific location, this has come up once before and I suppose you could program AHK to move cursor, view or weapon to a specific location, but it would be so much easier just to move the mouse.
is being kind of a dick here, sorry
A script like that would probably require quite a few "If/Else" statements though, and I have no idea how to deal with screen coordinates...
https://www.autohotkey.com/docs/commands/PixelSearch.htm
https://www.autohotkey.com/docs/commands/MouseMove.htm
https://www.autohotkey.com/docs/commands/MouseClick.htm
https://www.autohotkey.com/docs/commands/MouseClickDrag.htm
This link has a slightly similar script, which might give an idea on how to make the script that they want:
https www.reddit.com /r/AutoHotkey/comments/egpis6/help_needed_with_a_minecraft_script/ Broken Link for safety
Its2Izzi, when you buy, are you buying from a villager or from something that does not move?
Also, do you have to move your character, your view or both?
Lastly, do you want the script so that you can buy/craft in bulk, and is what you want it for something that you do often after going to do other things (gathering, building, etc.) or is it something that you will only do once/once in a while?
Re: Mousemove in Minecraft
I buy it from a villager who doesnt move. I need the script quite often, because he sells blocks for building. First I would walk in front of him and then activate the script. It should click on the villager, buy stuff, go out of the menu, look around to a crafting table, then click on it and finally craft the things i need. So in conclusion the character only needs to move the view. And thats the problem where I stuck. With the MouseMove command it spin around his head and end up looking in the sky. With other commands nothing happens
-
- Posts: 1
- Joined: 27 Dec 2021, 14:15
Re: Mousemove in Minecraft
Hi,
I am trying to make the same thing, did you found a way to move the mouse ingame with a macro ?
I want to make an automine and when I try the view goes on the ground and spin, it is weird.
Thanks,
Sorry for my grammar which is not very good, I'm french xD
I am trying to make the same thing, did you found a way to move the mouse ingame with a macro ?
I want to make an automine and when I try the view goes on the ground and spin, it is weird.
Thanks,
Sorry for my grammar which is not very good, I'm french xD
Re: Mousemove in Minecraft
It seems that mouse input to Minecraft is very tricky!
So far the best I have come up with is:
I had to use relative movement to avoid the spinning in all directions issue. I also had to slow the mouse to minimum speed to get any sort of consistency. The above is only about 75% effective... the rest of the time it wind up turning and looking at the sky or winding up looking the same direction it started.
But for some reason, it seems that it locks to looking at a specific direction. The above does a 180 turn, but I have not been able to find anything yet to reverse that turn... if I executed it a second time it does a 360 instead of a 180!
So far the best I have come up with is:
Code: Select all
MouseMove, 63, 0, 100, R
But for some reason, it seems that it locks to looking at a specific direction. The above does a 180 turn, but I have not been able to find anything yet to reverse that turn... if I executed it a second time it does a 360 instead of a 180!
Re: Mousemove in Minecraft
First of all, minecraft camera movement is depends on your sensitivity, there is 2 way to make the mouse movement run by the script works fine:
1. Lower your sensitivity
2. Lower the mouse movement on the script
AFAIK Minecraft always put the mouse in the middle screen, and it counts how far you move the cursor into the game.
You can test the script by using
negative value on X will move the cursor leftward
negative value on Y will move the cursor upward
after you have the value you need, you can use in the script.
note:
the second 0 is for movement speed, 0 for fastest, 100 for slowest.
1. Lower your sensitivity
2. Lower the mouse movement on the script
AFAIK Minecraft always put the mouse in the middle screen, and it counts how far you move the cursor into the game.
You can test the script by using
Code: Select all
x:: ; press "x" to move the cursor
MouseGetPos, xp, yp
xp:=xp
yp-=1
MouseMove, %xp%, ,%yp% 0 ; move the mouse 1 pixel up (Y Coord in screen)
return
negative value on Y will move the cursor upward
after you have the value you need, you can use in the script.
note:
the second 0 is for movement speed, 0 for fastest, 100 for slowest.