Skip to content

Instantly share code, notes, and snippets.

@cpgillem
Created June 13, 2020 02:06
Show Gist options
  • Select an option

  • Save cpgillem/24c2dd35d39e29f2fb2ca4455a2f490f to your computer and use it in GitHub Desktop.

Select an option

Save cpgillem/24c2dd35d39e29f2fb2ca4455a2f490f to your computer and use it in GitHub Desktop.
Autohotkey script for various Minecraft tasks
#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.
toggle_click=0
toggle_concrete=0
; CREDIT
; https://autohotkey.com/board/topic/111640-send-left-mouse-click-once-per-second/
F12::
If (toggle_click := !toggle_click)
SetTimer, Timer, -1
return
F10::
If (toggle_concrete := !toggle_concrete) {
SendInput {RButton Down}
Sleep, 500
SendInput {LButton Down}
} Else {
SendInput {RButton Up}
SendInput {LButton Up}
}
return
timer:
while toggle_click
{
Click
Sleep, 1000
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment