Skip to content

Commit 682c87e

Browse files
committed
Fix additional keybinds being intercepted when aditional keybinds are disabled
This fixes issue #25
1 parent 527ea7a commit 682c87e

File tree

3 files changed

+23
-25
lines changed

3 files changed

+23
-25
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
- 9.1.2: Fixed additional keybinds being intercepted when EnableAditionalKeybinds is set to 0
12
- 9.1.1: Added config to toggle aditional keybinds, changed CTRL+ALT+O/P keybinds to SHIFT+CTRL
23
- 9.1.0: Update for maw-muter(fix pid muting errors), add force update GUI
34
- 9.0.0: MAW-MUTER.ahk is now default muting method

MuteActiveWindow/MuteActiveWindow.ahk

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ConfigDir := ScriptDir . "\Config"
1212
ConfigFile := ConfigDir . "\Settings.ini"
1313
ExcludedAppsFile := ConfigDir . "\ExcludedApps.txt"
1414

15-
global ScriptVersion := "9.1.1"
15+
global ScriptVersion := "9.1.2"
1616

1717
; Add custom menu items to the tray menu
1818
AddCustomMenus() ; Add custom menu options on script startup
@@ -387,31 +387,28 @@ CheckForUpdates(isFromMenu := false) {
387387
}
388388
}
389389

390+
#If (EnableAditionalKeybind = "1")
390391
^+P::
391-
if (EnableAditionalKeybind = "1") {
392-
WindowUWP := WinExist("A")
393-
ControlGetFocus, FocusedControl, ahk_id %WindowUWP%
394-
ControlGet, Hwnd, Hwnd,, %FocusedControl%, ahk_id %WindowUWP%
395-
WinGet, uwpprocess, processname, ahk_id %Hwnd%
396-
397-
; Prompt the user with a message box with "Yes" and "No" buttons
398-
MsgBox, 4, Add Exe to excluded apps., Add EXE to Config/ExcludedApps.txt?`n%uwpprocess%
392+
WindowUWP := WinExist("A")
393+
ControlGetFocus, FocusedControl, ahk_id %WindowUWP%
394+
ControlGet, Hwnd, Hwnd,, %FocusedControl%, ahk_id %WindowUWP%
395+
WinGet, uwpprocess, processname, ahk_id %Hwnd%
396+
397+
; Prompt the user with a message box with "Yes" and "No" buttons
398+
MsgBox, 4, Add Exe to excluded apps., Add EXE to Config/ExcludedApps.txt?`n%uwpprocess%
399+
400+
; Check if the user clicked "Yes"
401+
IfMsgBox Yes
402+
{
403+
FileAppend, `n%uwpprocess%, %ConfigDir%\ExcludedApps.txt
399404

400-
; Check if the user clicked "Yes"
401-
IfMsgBox Yes
402-
{
403-
FileAppend, `n%uwpprocess%, %ConfigDir%\ExcludedApps.txt
404-
405-
MsgBox, Added %uwpprocess% to Config/ExcludedApps.txt
406-
}
405+
MsgBox, Added %uwpprocess% to Config/ExcludedApps.txt
407406
}
408-
409407
return
410408

411-
^+O:: ; CTRL+ALT+O to RE-RUN MAW as Admin
412-
if (EnableAditionalKeybind = "1") {
413-
Run *RunAs "%A_ScriptFullPath%", , UseErrorLevel
414-
if ErrorLevel
415-
MsgBox, Failed to run MAW as administrator.
416-
return
417-
}
409+
^+O:: ; CTRL+SHIFT+O to RE-RUN MAW as Admin
410+
Run *RunAs "%A_ScriptFullPath%", , UseErrorLevel
411+
if ErrorLevel
412+
MsgBox, Failed to run MAW as administrator.
413+
return
414+
#If

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9.1.1
1+
9.1.2

0 commit comments

Comments
 (0)