Send commands to minimized minecraft

Ask gaming related questions (AHK v1.1 and older)
7M8
Posts: 2
Joined: 10 Jul 2018, 05:55

Send commands to minimized minecraft

Post by 7M8 » 10 Jul 2018, 06:13

Hi there.

I want to make a code that will press / and then type sell all and press enter.

It works well with Send command while I'm in the game but I want it to work while the game is in the background and I'm browsing or whatever..

Here's the code I've right now:

Code: Select all

*F1::
loop{
	ControlSend, ,/, Minecraft 1.12.2
	sleep 500
	ControlSend, ,sell all{enter}, Minecraft 1.12.2
	Sleep 60000
}
Return

#p::Pause,Toggle
But it doesn't work.. I know when you change the window of minecraft, the "Game Menu" will appear and block chat, I think this is the problem..

Is there a way I can achieve this?

7M8
Posts: 2
Joined: 10 Jul 2018, 05:55

Re: Send commands to minimized minecraft

Post by 7M8 » 10 Jul 2018, 11:25

I solved this by using minecraft in borderless window mode + disabling the game menu, it also didn't write the command properly so I had to use SetKeyDelay.

So the final code is:

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.


*F1::
loop{
SetKeyDelay, 50, 50
ControlSend, ,/ ,Minecraft 1.12.2
ControlSend, ,Sell all{ENTER},Minecraft 1.12.2
sleep 60000
}
Return

#p::Pause,Toggle

ahnakin
Posts: 6
Joined: 10 Aug 2022, 18:08

Re: Send commands to minimized minecraft

Post by ahnakin » 10 Aug 2022, 18:10

Sorry, but how did you use "borderless window mode + disabling the game menu". Minecraft (Bedrock at least) won't run in borderless window mode, and I can't find any way to disable the game menu.

Post Reply

Return to “Gaming Help (v1)”