From 7a0db3ba274e0f9218c8d91fc3699de87e90da1a Mon Sep 17 00:00:00 2001 From: Mar Alegre Date: Sun, 15 Nov 2020 15:10:27 -0500 Subject: [PATCH] cleaned up Outer Wilds script --- src/Outer_Wilds.ahk | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Outer_Wilds.ahk b/src/Outer_Wilds.ahk index 197c189..ca90b5b 100644 --- a/src/Outer_Wilds.ahk +++ b/src/Outer_Wilds.ahk @@ -18,10 +18,9 @@ SetTitleMatchMode,2 DetectHiddenWindows,On ; Set percent to deflect by for fine controls -Defl := 30 +Defl := 40 ; Create Gui to show deflection percent -MyGuiTime = 1 Gui, +AlwaysOnTop -Caption +ToolWindow Gui, Margin, 0, 0 Gui, Font, s20 CWhite @@ -30,6 +29,10 @@ Gui, Add, Text, vMyGuiText +Center, Fine Controls: 100`% Gui, Show, NoActivate, OuterWildsAhkGui WinSet, TransColor, Black, OuterWildsAhkGui +DrawGui: +MyGuiTime = 10 +SetTimer, UpdateGui, 100 + UpdateGui: If (MyGuiTime != 0) { Gui, Show, NoActivate @@ -64,9 +67,7 @@ MyXbox.Axes.LX.SetState(50) MyXbox.Axes.RT.SetState(0) MyXbox.Axes.LT.SetState(0) If GetKeyState("CapsLock","T") { - MyGuiTime = 10 - SetTimer, UpdateGui, 100 - Goto UpdateGui + Goto DrawGui } return @@ -94,13 +95,9 @@ Shift UP::MyXbox.Axes.LT.SetState(0) ; Alt+Scroll changes deflect percent *!WheelUp:: Defl := Min(Defl + 5,100) -MyGuiTime = 10 -SetTimer, UpdateGui, 100 -Goto UpdateGui +Goto DrawGui return *!WheelDown:: Defl := Max(Defl - 5,0) -MyGuiTime = 10 -SetTimer, UpdateGui, 100 -Goto UpdateGui +Goto DrawGui return \ No newline at end of file