-
-
Save pa-0/98ce5e67cf00738b4dadfc14024f0887 to your computer and use it in GitHub Desktop.
Revisions
-
natekford revised this gist
Sep 6, 2025 . 1 changed file with 8 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,40 +3,32 @@ global MIC := "FIFINE T669" Notify(false) SetTimer(CheckExes, 1000) *F24:: { SoundSetMute(-1, , MIC) Notify(true) } Notify(makeNoise) { isMuted := SoundGetMute(, MIC) ; 12 = not filled in W10 microphone, 13 = filled in W10 microphone TraySetIcon("sndvolsso.dll", isMuted ? 12 : 13) if (makeNoise) { SoundPlay(isMuted ? "C:\Windows\Media\Speech Off.wav" : "C:\Windows\Media\Speech On.wav") ToolTip(isMuted ? "MUTED" : "UNMUTED") SetTimer(() => ToolTip(), -1000) } } CheckExes() { ; some games interfere with hotkeys until the script is restarted static ahk_start := A_TickCount static exes := Map("RDR2", false) @@ -45,7 +37,6 @@ CheckExes() ; exe currently running ; if it's been running before the script, that's fine ; only restart if the exe is started after the script if (WinExist("ahk_exe " . exe . ".exe")) { if (!isRunning && A_TickCount > ahk_start + 5000) -
natekford revised this gist
Sep 6, 2025 . 1 changed file with 12 additions and 24 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -3,46 +3,34 @@ global MIC := "FIFINE T669" Notify(true) SetTimer(CheckExes, 1000) *F24:: { SoundSetMute(-1, , MIC) Notify(false) } Notify(isStartup) { isMuted := SoundGetMute(, MIC) if (isMuted) { TraySetIcon("sndvolsso.dll", 12) ; 12 = not filled in W10 microphone } else { TraySetIcon("sndvolsso.dll", 13) ; 13 = filled in W10 microphone } if (!isStartup) { if (!isMuted) { SoundPlay("*-1") } ToolTip(isMuted ? "MUTED" : "UNMUTED") SetTimer(() => ToolTip(), -1000) } } -
natekford created this gist
Feb 9, 2025 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,78 @@ #Requires AutoHotkey v2+ #SingleInstance Force global MIC := "FIFINE T669" ChangeStatusIcons(false) SetTimer(CheckExes, 1000) ; Pressing the Windows key by accident is annoying LWin::return ; The keyboard I have doesn't have a mute button (it does have FN+10 but I don't want to use 2 keys) Pause:: { Send("{Volume_Mute}") } *F24:: { SoundSetMute(-1, , MIC) SoundPlay("*-1") ChangeStatusIcons(true) } ChangeStatusIcons(showToolTip) { text := "" if (SoundGetMute(, MIC)) { SetScrollLockState(False) ; TraySetIcon(A_AhkPath, 3) ; 3 = not filled in AHK icon TraySetIcon("sndvolsso.dll", 12) ; 12 = not filled in W10 microphone text := "MUTED" } else { SetScrollLockState(True) ; TraySetIcon(A_AhkPath, 1) ; 1 = filled in AHK icon TraySetIcon("sndvolsso.dll", 13) ; 13 = filled in W10 microphone text := "UNMUTED" } if (showToolTip) { ToolTip(text) SetTimer(() => ToolTip(), -1000) } } CheckExes() { static ahk_start := A_TickCount static exes := Map("RDR2", false) for exe, isRunning in exes { ; exe currently running ; if it's been running before the script, that's fine ; only restart if the exe is started after the script ; since some games interfere with hotkeys until script restarted if (WinExist("ahk_exe " . exe . ".exe")) { if (!isRunning && A_TickCount > ahk_start + 5000) { Reload() } else { exes[exe] := true } } ; exe not running anymore, set back to false else { exes[exe] := false } } }