Based on this discussion viewtopic.php?t=38649 I came up with something like this
Code: Select all
~XButton1 & MButton:: Magnify("ZOOM OUT") ; Backward Mouse Button + Middle Mouse Button
BlockInput ON
Sleep 555
BlockInput OFF
return
~XButton2 & MButton:: Magnify("ZOOM IN") ; Forward Mouse Button + Middle Mouse Button
BlockInput ON
Sleep 555
BlockInput OFF
return
~XButton2 & XButton1:: Magnify("EXIT MAGNIFIER") ; Forward Mouse Button + Backward Mouse Button
BlockInput ON
Sleep 555
BlockInput OFF
return
Magnify(mode) {
static WM_SYSCOMMAND := 0x112, SC_CLOSE := 0xF060
hwnd := WinExist("ahk_class MagUIClass")
if (mode = "EXIT MAGNIFIER")
SendMessage, WM_SYSCOMMAND, SC_CLOSE,,, ahk_id %hwnd%
else {
if !hwnd
Run, magnify.exe
else if (mode = "ZOOM IN")
Send #=
else
Send #-
}
}
This latter one happens also often when instead of such AHK script I use freeware X-Mouse Button Control: its ability to control zooming with its global Button Chording set for above buttons [which is forcing me me to look for an alternative to it in form of an AHK script]. So this would point out to the Microsoft's Magnifier itself being just a bad written program, right? So I have so far already tested out more than 5 other zooming programs- but unfortunately they all lacked desired be my functionality [of working in a full screen mode and having buttons / shortcuts for zooming steps]
Hence the question about approaching this issue: should I tackle Magnify.exe with the above script in hopes its blockade can be overcome; or alternatively it will stop executing sending FMB, BMB and MMB clicks when they are used in defined hotkey in this script? Or should I rather continue wasting time on looking for another zooming program in hopes that it will not block input, but which would also require from me of writing a proper script that will be able to control this other zooming software?
I am using Windows 10 Enterprise 20H2 x64