AFK AHK Script

This is my simple AutoHotKey script for AFK actions in Minecraft.

Pressing F7 will toggle left mouse click. F8 will toggle right.

  • Install AutoHotKey
  • Paste this into a new text file, something.ahk
  • Double clicking loads it into your tray and the shortcuts are available in Minecraft.
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#Singleinstance force

; Fish - Holds down right click until F8 is pressed again
*f8::
    toggle := !toggle
	if (toggle) {
		SendInput {RButton Down}
	}
	else {
		SendInput {RButton Up}
	}
return

; Mine - Holds down left click until F7 is pressed again
*f7::
    toggle := !toggle
	if (toggle) {
		SendInput {LButton Down}
	}
	else {
		SendInput {LButton Up}
	}
return