Created
July 27, 2020 23:41
-
-
Save peromage/b3f0aa1f97dc97bc9a657fd773536ea7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Monster Hunter World Steamworks Automation | |
; Version: 1.1 | |
; Author: Fang | |
; Date: 2020/02/11 | |
#If seen ; Needed for context sensitive hotkey command. | |
#If looping ; Needed for context sensitive hotkey command. | |
#If | |
#NoEnv | |
#NoTrayIcon | |
; Settings | |
SetWorkingDir, %A_ScriptDir% | |
looping := false | |
seen := true | |
interval := 50 | |
transLevel:=140 | |
trans := 255 | |
; Hotkeys | |
HotKey, F5, automationOn, On | |
Hotkey, F6, showOn, On | |
Hotkey, F7, transToggle, On | |
Hotkey, If, seen | |
Hotkey, F6, showOff | |
Hotkey, If, looping | |
HotKey, F5, automationOff | |
Hotkey, If | |
; End settings | |
; Creates the overlay | |
Gui, +ToolWindow +HWNDguiID +AlwaysOnTop | |
Gui, Add, Text, cGreen Section, MHW Steamworks Automation simulates keystroke sequence <A, W, D> | |
Gui, Add, Text, xs, Usage | |
Gui, Add, Text,, <F5> Toggle automation | |
Gui, Add, Text,, <F6> Toggle overlay | |
Gui, Add, Text,, <F7> Toggle overlay transparency | |
Gui, Add, Text, Section, Interval | |
Gui, Add, Edit, ys vedit | |
Gui, Add, UpDown, ys vinterval Range10-1000, %interval% | |
Gui, Add, Text, ys, (ms) | |
Gui, Add, Button, w200 h80 xm gautomationOff vbutton cRed, EMERGENCY STOP | |
Gosub, toggleControlStatus | |
Gui, Show, AutoSize, Steamworks | |
return | |
GuiClose: | |
exitapp | |
toggleControlStatus: | |
if looping | |
{ | |
GuiControl, Disable, edit | |
GuiControl, Disable, interval | |
GuiControl, Enable, button | |
return | |
} | |
GuiControl, Enable, edit | |
GuiControl, Enable, interval | |
GuiControl, Disable, button | |
return | |
; End overlay | |
; Hotkey labels | |
transToggle: | |
WinSet, Transparent, % trans:= trans=255 ? transLevel:255 , ahk_id %guiID% | |
return | |
showOff: | |
Gui, show, hide | |
seen := false | |
return | |
showOn: | |
Gui, show | |
seen := true | |
return | |
automationOff: | |
looping := false | |
return | |
automationOn: | |
GuiControlGet, interval | |
looping := true | |
Gosub, toggleControlStatus | |
While looping | |
{ | |
Send, {a down}{a up} | |
Sleep, interval | |
Send, {w down}{w up} | |
Sleep, interval | |
Send, {d down}{d up} | |
Sleep, interval | |
Send, {Space down}{Space up} | |
Sleep, interval | |
} | |
looping := false | |
Gosub, toggleControlStatus | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment