@@ -12,7 +12,7 @@ ConfigDir := ScriptDir . "\Config"
1212ConfigFile := ConfigDir . " \Settings.ini"
1313ExcludedAppsFile := 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
1818AddCustomMenus() ; 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-
409407return
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
0 commit comments