Browse Source

cleaned up Outer Wilds script

ahk-v1
Mar Alegre 5 years ago
parent
commit
7a0db3ba27
  1. 19
      src/Outer_Wilds.ahk

19
src/Outer_Wilds.ahk

@ -18,10 +18,9 @@ SetTitleMatchMode,2
DetectHiddenWindows,On DetectHiddenWindows,On
; Set percent to deflect by for fine controls ; Set percent to deflect by for fine controls
Defl := 30 Defl := 40
; Create Gui to show deflection percent ; Create Gui to show deflection percent
MyGuiTime = 1
Gui, +AlwaysOnTop -Caption +ToolWindow Gui, +AlwaysOnTop -Caption +ToolWindow
Gui, Margin, 0, 0 Gui, Margin, 0, 0
Gui, Font, s20 CWhite Gui, Font, s20 CWhite
@ -30,6 +29,10 @@ Gui, Add, Text, vMyGuiText +Center, Fine Controls: 100`%
Gui, Show, NoActivate, OuterWildsAhkGui Gui, Show, NoActivate, OuterWildsAhkGui
WinSet, TransColor, Black, OuterWildsAhkGui WinSet, TransColor, Black, OuterWildsAhkGui
DrawGui:
MyGuiTime = 10
SetTimer, UpdateGui, 100
UpdateGui: UpdateGui:
If (MyGuiTime != 0) { If (MyGuiTime != 0) {
Gui, Show, NoActivate Gui, Show, NoActivate
@ -64,9 +67,7 @@ MyXbox.Axes.LX.SetState(50)
MyXbox.Axes.RT.SetState(0) MyXbox.Axes.RT.SetState(0)
MyXbox.Axes.LT.SetState(0) MyXbox.Axes.LT.SetState(0)
If GetKeyState("CapsLock","T") { If GetKeyState("CapsLock","T") {
MyGuiTime = 10 Goto DrawGui
SetTimer, UpdateGui, 100
Goto UpdateGui
} }
return return
@ -94,13 +95,9 @@ Shift UP::MyXbox.Axes.LT.SetState(0)
; Alt+Scroll changes deflect percent ; Alt+Scroll changes deflect percent
*!WheelUp:: *!WheelUp::
Defl := Min(Defl + 5,100) Defl := Min(Defl + 5,100)
MyGuiTime = 10 Goto DrawGui
SetTimer, UpdateGui, 100
Goto UpdateGui
return return
*!WheelDown:: *!WheelDown::
Defl := Max(Defl - 5,0) Defl := Max(Defl - 5,0)
MyGuiTime = 10 Goto DrawGui
SetTimer, UpdateGui, 100
Goto UpdateGui
return return
Loading…
Cancel
Save