Lazy Galaxy 2

Lazy Galaxy 2

Not enough ratings
Auto Clicker (with AutoHotkey)
By darkly77
Hold space to automatically click
   
Award
Favorite
Favorited
Unfavorite
Intro
Use this script with the free program Autohotkey:

https://www.autohotkey.com

When the script is run, hold [space] to automatically click at a very rapid pace.

Works best with the Scavenger guild. Can also be used to collect health packs in battle a bit faster (hold space and hover over them)
Autoclicker Script
To use this, copy and paste it into a file with the extension .ahk. You can name it whatever you like, I called mine:

LazyGalaxy2--LMB-While-Holding-Space.ahk

Next, double-click that new file to start running the script. If successful, you'll see the Autohotkey icon in your system tray (ie. in the bottom right, near the clock).

The script is only run while Lazy Galaxy 2 is in focus.

#IfWinActive ahk_exe LazyGalaxy2.exe Space:: while GetKeyState("Space","P") { Send {LButton} sleep 10 } Return #IfWinActive
Bonus A: Keyboard Mining
If you've unlocked the Ascension upgrade "Keyboard Mining" (which you should, it's great) then clicking on asteroids might feel obsolete.

With this script, holding Enter will auto press the keyboard keys (QWER and HJKL), letting you mine asteroids at ridiculously fast rates.

LazyGalaxy2--Keyboard-Mining-While-Holding-Enter.ahk

#IfWinActive ahk_exe LazyGalaxy2.exe Enter:: while GetKeyState("Enter","P") { Send {Q} Send {W} Send {E} Send {R} Send {H} Send {J} Send {K} Send {L} sleep 50 } Return #IfWinActive

Alternatively, the script below does the same thing but uses a toggle.

Press Enter to enable, press it again to disable. This one is good for if you want to leave the window open.

WARNING: While there is code here to disable the key presses if the game loses focus, it will still press "Q" once after losing focus. Shouldn't be a major issue, but it's best to disable the toggle by pressing Enter before switching windows.

LazyGalaxy2--Keyboard-Mining-While-Holding-Enter--Toggled.ahk

#IfWinActive ahk_exe LazyGalaxy2.exe ; Lets us to check if Enter is pressed again to disable the toggle #MaxThreadsPerHotkey 2 Enter:: toggle := !toggle While(toggle) { ; Disable the toggle if the window loses focus if !WinActive("ahk_exe LazyGalaxy2.exe") { toggle = 0 } ; Send the keyboard mining keys Send {Q} ; We don't actually need all these, Q is pressed often enough ;Send {W} ;Send {E} ;Send {R} ;Send {H} ;Send {J} ;Send {K} ;Send {L} ; ... ;sleep 10 ; (0.01s) - causes serious lag if left for too long sleep 50 ; (0.05s) - best default setting, seems pretty safe, some lag ;sleep 100 ; (0.1s) - tested as safe to leave on overnight, slower mining though } Return #IfWinActive
Bonus B: Autopress 1
Here's a bonus script. Holding [TAB] during a battle will press the [1] key repeatedly. It's meant for auto-firing your special weapons, so make sure you have the ship with the special you want to use at the top of your hanger.

It's a bit redundant since an ascension upgrade offers something similar, but with the upgrade you have to keep pressing the number key for it to trigger again, and holding shift may be a bit cumbersome for some people.

Usage is the same as above. I named my file:

LazyGalaxy2--1-While-Holding-Tab.ahk

#IfWinActive ahk_exe LazyGalaxy2.exe Tab:: while GetKeyState("Tab","P") { Send {1} sleep 10 } Return #IfWinActive
2 Comments
Potato Apr 4, 2022 @ 9:05pm 
haha I made something similar. Good stuff for doing in ahk to make it shareable
Krazy Ivan Apr 4, 2022 @ 9:51am 
thanks you :)