Skip to content

Instantly share code, notes, and snippets.

@DeeJayhX
Created April 6, 2019 04:20
Show Gist options
  • Save DeeJayhX/d897ca3c8c27880cb36e2a5942cee0b5 to your computer and use it in GitHub Desktop.
Save DeeJayhX/d897ca3c8c27880cb36e2a5942cee0b5 to your computer and use it in GitHub Desktop.
Hacknet Authotkey for Shells
SetKeyDelay, 15, 25
^s::
if WinActive("ahk_exe Hacknet.exe")
{
Send shell
Send {enter}
Send cd log
Send {enter}
Send rm *
Send {enter}
Searching := True
while Searching
{
CoordMode Pixel ; Interprets coordinates relative to screen rather than active window
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, empty.bmp
if ErrorLevel = 2
{
MsgBox Could not conduct the search.
Seaching := False
}
else if ErrorLevel = 1
{
; TrayTip Waiting, Waiting for Log folder to empty., ,1
Sleep 2500
}
else
{
Send disconnect
Send {enter}
Searching := False
}
}
}
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment