From 6eea030d1d765071877cf311313bc646d92e6e07 Mon Sep 17 00:00:00 2001 From: wandersick Date: Tue, 24 Oct 2017 23:00:01 +0800 Subject: [PATCH] Add files via upload --- Data/AeroZoom_Alt.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Alt_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Ctrl.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Ctrl_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseL.ahk | 333 +++++++++++++++++++--------------- Data/AeroZoom_MouseL_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseM.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseM_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseR.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseR_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseX1.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseX1_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseX2.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_MouseX2_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Shift.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Shift_x64.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Win.ahk | 332 ++++++++++++++++++--------------- Data/AeroZoom_Win_x64.ahk | 332 ++++++++++++++++++--------------- 18 files changed, 3385 insertions(+), 2592 deletions(-) diff --git a/Data/AeroZoom_Alt.ahk b/Data/AeroZoom_Alt.ahk index fb4c07c..f9b8ce7 100644 --- a/Data/AeroZoom_Alt.ahk +++ b/Data/AeroZoom_Alt.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START !WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return !WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7581,11 +7469,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7946,6 +7834,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8131,6 +8020,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9414,7 +9307,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10823,6 +10716,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15585,6 +15490,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Alt_x64.ahk b/Data/AeroZoom_Alt_x64.ahk index fb4c07c..f9b8ce7 100644 --- a/Data/AeroZoom_Alt_x64.ahk +++ b/Data/AeroZoom_Alt_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START !WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return !WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7581,11 +7469,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7946,6 +7834,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8131,6 +8020,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9414,7 +9307,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10823,6 +10716,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15585,6 +15490,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Ctrl.ahk b/Data/AeroZoom_Ctrl.ahk index 17f1bdc..3dd74d6 100644 --- a/Data/AeroZoom_Ctrl.ahk +++ b/Data/AeroZoom_Ctrl.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ^WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ^WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7582,11 +7470,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7947,6 +7835,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8132,6 +8021,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9415,7 +9308,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10824,6 +10717,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15586,6 +15491,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Ctrl_x64.ahk b/Data/AeroZoom_Ctrl_x64.ahk index 17f1bdc..3dd74d6 100644 --- a/Data/AeroZoom_Ctrl_x64.ahk +++ b/Data/AeroZoom_Ctrl_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ^WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ^WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7582,11 +7470,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7947,6 +7835,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8132,6 +8021,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9415,7 +9308,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10824,6 +10717,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15586,6 +15491,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseL.ahk b/Data/AeroZoom_MouseL.ahk index c9ac653..80c3e78 100644 --- a/Data/AeroZoom_MouseL.ahk +++ b/Data/AeroZoom_MouseL.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~LButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~LButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7905,11 +7793,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -8270,6 +8158,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8455,6 +8344,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -8870,6 +8763,7 @@ if zoomitPanel { { if not GuideDisabled { + Msgbox, 262144, This message will only be shown once, 'Reset' is suggested as a replacement for 'Kill' because of its better zoom performance.`n`n'Kill magnifier' is only useful for stopping Docked and Lens view and to work around a bug of Windows Media Center where the cursor is gone while Magnifier is running.`n`nIf you do happen to use Windows Media Center with AeroZoom, consider enabling holding the middle button to kill magnifier in 'Tool > Preferences > Custom Hotkeys > Middle' so that you can bring the cursor back more easily. killGuidance = 1 RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, killGuidance, 1 @@ -9738,7 +9632,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -11147,6 +11041,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15909,6 +15815,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseL_x64.ahk b/Data/AeroZoom_MouseL_x64.ahk index 7e0dbba..80c3e78 100644 --- a/Data/AeroZoom_MouseL_x64.ahk +++ b/Data/AeroZoom_MouseL_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~LButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~LButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7905,11 +7793,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -8270,6 +8158,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8455,6 +8344,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9739,7 +9632,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -11148,6 +11041,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15910,6 +15815,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseM.ahk b/Data/AeroZoom_MouseM.ahk index d1351c2..016d6d8 100644 --- a/Data/AeroZoom_MouseM.ahk +++ b/Data/AeroZoom_MouseM.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~MButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~MButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7870,11 +7758,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -8235,6 +8123,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8420,6 +8309,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9703,7 +9596,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -11112,6 +11005,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15874,6 +15779,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseM_x64.ahk b/Data/AeroZoom_MouseM_x64.ahk index d1351c2..016d6d8 100644 --- a/Data/AeroZoom_MouseM_x64.ahk +++ b/Data/AeroZoom_MouseM_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~MButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~MButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7870,11 +7758,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -8235,6 +8123,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8420,6 +8309,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9703,7 +9596,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -11112,6 +11005,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15874,6 +15779,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseR.ahk b/Data/AeroZoom_MouseR.ahk index d8b89c3..1f99167 100644 --- a/Data/AeroZoom_MouseR.ahk +++ b/Data/AeroZoom_MouseR.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~RButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~RButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7403,11 +7291,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7768,6 +7656,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -7953,6 +7842,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9236,7 +9129,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10645,6 +10538,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15407,6 +15312,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseR_x64.ahk b/Data/AeroZoom_MouseR_x64.ahk index d8b89c3..1f99167 100644 --- a/Data/AeroZoom_MouseR_x64.ahk +++ b/Data/AeroZoom_MouseR_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~RButton & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~RButton & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7403,11 +7291,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7768,6 +7656,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -7953,6 +7842,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9236,7 +9129,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10645,6 +10538,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15407,6 +15312,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseX1.ahk b/Data/AeroZoom_MouseX1.ahk index eaa07e1..527904c 100644 --- a/Data/AeroZoom_MouseX1.ahk +++ b/Data/AeroZoom_MouseX1.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~XButton1 & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~XButton1 & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7578,11 +7466,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7943,6 +7831,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8128,6 +8017,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9411,7 +9304,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10820,6 +10713,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15582,6 +15487,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseX1_x64.ahk b/Data/AeroZoom_MouseX1_x64.ahk index eaa07e1..527904c 100644 --- a/Data/AeroZoom_MouseX1_x64.ahk +++ b/Data/AeroZoom_MouseX1_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~XButton1 & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~XButton1 & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7578,11 +7466,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7943,6 +7831,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8128,6 +8017,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9411,7 +9304,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10820,6 +10713,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15582,6 +15487,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseX2.ahk b/Data/AeroZoom_MouseX2.ahk index a70c296..d838eaa 100644 --- a/Data/AeroZoom_MouseX2.ahk +++ b/Data/AeroZoom_MouseX2.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~XButton2 & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~XButton2 & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7576,11 +7464,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7941,6 +7829,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8126,6 +8015,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9409,7 +9302,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10818,6 +10711,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15580,6 +15485,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_MouseX2_x64.ahk b/Data/AeroZoom_MouseX2_x64.ahk index a70c296..d838eaa 100644 --- a/Data/AeroZoom_MouseX2_x64.ahk +++ b/Data/AeroZoom_MouseX2_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START ~XButton2 & WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return ~XButton2 & WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7576,11 +7464,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7941,6 +7829,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8126,6 +8015,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9409,7 +9302,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10818,6 +10711,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15580,6 +15485,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Shift.ahk b/Data/AeroZoom_Shift.ahk index d2ad513..5f8ecdd 100644 --- a/Data/AeroZoom_Shift.ahk +++ b/Data/AeroZoom_Shift.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START +WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return +WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7580,11 +7468,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7945,6 +7833,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8130,6 +8019,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9413,7 +9306,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10822,6 +10715,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15584,6 +15489,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Shift_x64.ahk b/Data/AeroZoom_Shift_x64.ahk index d2ad513..5f8ecdd 100644 --- a/Data/AeroZoom_Shift_x64.ahk +++ b/Data/AeroZoom_Shift_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START +WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return +WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7580,11 +7468,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7945,6 +7833,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8130,6 +8019,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9413,7 +9306,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10822,6 +10715,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15584,6 +15489,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Win.ahk b/Data/AeroZoom_Win.ahk index 7ae9d92..0e214e3 100644 --- a/Data/AeroZoom_Win.ahk +++ b/Data/AeroZoom_Win.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START #WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return #WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7581,11 +7469,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7946,6 +7834,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8131,6 +8020,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9414,7 +9307,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10823,6 +10716,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15585,6 +15490,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up. diff --git a/Data/AeroZoom_Win_x64.ahk b/Data/AeroZoom_Win_x64.ahk index 7ae9d92..0e214e3 100644 --- a/Data/AeroZoom_Win_x64.ahk +++ b/Data/AeroZoom_Win_x64.ahk @@ -14,7 +14,7 @@ SetBatchLines -1 ; run at fastest speed before init IfEqual, unattendAZ, 1 goto Install -verAZ = 4.0 beta 1 +verAZ = 4.0 beta 2 paused = ; Working directory check @@ -277,11 +277,6 @@ menu, tray, add, Pause &Mouse Hotkeys`t[Win+Alt+H], PauseScriptViaTrayPauseMouse If not menuInit menu, tray, add ; separator menu, tray, add, &Quick Instructions`t[Win+Alt+Q], Instruction -If not menuInit - menu, tray, add ; separator -Menu, tray, Add, User Experience &Survey, UserExperienceSurvey -Menu, tray, Add, AeroZoom &Web, VisitWeb -menu, tray, add, &About, HelpAbout If not menuInit menu, tray, add ; separator if profileInUse { @@ -289,7 +284,18 @@ if profileInUse { } else { profileInUseDisplay = None } -menu, tray, add, Restore &Default Settings [Profile: %profileInUseDisplay%], RestoreDefaultSettings +menu, tray, add, Restore &Default Settings`t[Profile: %profileInUseDisplay%], RestoreDefaultSettings +If not menuInit + menu, tray, add ; separator +if not registered + Menu, tray, Add, Donate via PayPal/Bitcoin, Donate +Menu, tray, Add, User Experience &Survey, UserExperienceSurvey +; Menu, tray, Add, AeroZoom &Web, VisitWeb +; If not menuInit +; menu, tray, add ; separator +;menu, tray, add, &Update, CheckUpdate +menu, tray, add, &About, HelpAbout +If not menuInit menu, tray, add ; separator menu, tray, add, &Restart, RestartAZ menu, tray, add, &Exit, ExitAZ @@ -929,6 +935,13 @@ if errorlevel ; if the key is never created, i.e. first-run RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ElasticZoom, 1 } +RegRead,ReverseZoom,HKCU,Software\wandersick\AeroZoom,ReverseZoom +if errorlevel ; if the key is never created, i.e. first-run +{ + ReverseZoom=0 ; Reverse Zoom off by default + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 +} + RegRead,NirCmd,HKCU,Software\wandersick\AeroZoom,NirCmd @@ -1566,142 +1579,17 @@ return ; ----------------------------------------------------- Left Button Assignment START #WheelUp:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - sendinput ^{Up} - return -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Up} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Up} - } else { - sendinput ^4 - gosub, WorkaroundFullScrLiveZoom - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - Process, Exist, zoomit.exe - If not errorlevel - { - Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. - return - } - IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe - goto, zoomit - IfWinExist, ahk_class ZoomitClass - { - sendinput {Up} - } Else { - if not zoomItGuidance - Gosub, ZoomItGuidance - Gosub, ZoomPad - if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) - padStayTimeTemp:=padStayTime*2 - Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up - } - Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit - process, close, osd.exe ; prevent osd from showing in 'picture' - sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others - } -} else { - ; send {LWin down}{NumpadAdd}{LWin up} - ; the following is used instead instead of 'send' for better performance - Gosub, ZoomPad - - ; Mouse-Centered Zoom (center the cursor before zoom) - if (OSver>=6.1) { - ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit - if mouseCenteredZoomBit - Gosub, MouseCenteredZoom - } - - if numPadAddBit - sendinput #{NumpadAdd} - else - SendInput #{+} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomOut +Else + GoSub, ZoomIn return #WheelDown:: -if paused - return -IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead -{ - If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { - sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. - return - } else { - sendinput ^{Down} - return - } -} -IfWinExist, ahk_class ZoomitClass -{ - sendinput {Down} - return -} -if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { - Gosub, ZoomPad - IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter - { - sendinput ^{Down} - } -} else if (OSver<6 OR zoomitStill) { ; still zoom for xp - IfWinExist, ahk_class ZoomitClass - { - sendinput {Down} - } -} else { - ; only enable zoompad when modifier is a mouse button - if (chkMod>4) - { - if zoomPad ; if zoompad is NOT disabled - { - IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) - { - RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad - if not (MagnificationRaw=0x64) - { - IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks - { - WinActivate - } else { - Run, "%A_WorkingDir%\Data\ZoomPad.exe" - } - } - } - } - } - - if numPadSubBit - sendinput #{NumpadSub} - else - SendInput #{-} - IfWinExist, AeroZoom Panel - { - Gosub, ReadValueUpdatePanel - } -} +if ReverseZoom + GoSub, ZoomIn +Else + GoSub, ZoomOut return ; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min @@ -7581,11 +7469,11 @@ If not menuInit if registered Menu, AboutMenu, Add, &Registration, Donate ; Menu, AboutMenu, Add, &Email a Bug, EmailBugs ; Cancelled due to not universally supported -if not registered - Menu, AboutMenu, Add, Donate $1, Donate Menu, AboutMenu, Add, AeroZoom &Web, VisitWeb Menu, AboutMenu, Add, User Experience &Survey, UserExperienceSurvey - +if not registered + Menu, AboutMenu, Add, Donate via PayPal/Bitcoin, Donate + Menu, SnipMenu, Add, Free-form`tWin+Alt+F, SnipFree Menu, SnipMenu, Add, Rectangular`tWin+Alt+R, SnipRect Menu, SnipMenu, Add, Window`tWin+Alt+W, SnipWin @@ -7946,6 +7834,7 @@ Menu, ToolboxMenu, Add, &Save Captures, NirCmd Menu, ToolboxMenu, Add, &Misclick-Preventing Pad, UseZoomPad Menu, ToolboxMenu, Add, &Type with Notepad, UseNotepad Menu, ToolboxMenu, Add, &Elastic Zoom, ToggleElasticZoom +Menu, ToolboxMenu, Add, &Reverse Zoom, ReverseZoom Menu, ToolboxMenu, Add, &Always on Top, OnTop If not menuInit Menu, ToolboxMenu, Add ; separator @@ -8131,6 +8020,10 @@ if (elasticZoom=1) { Menu, ToolboxMenu, Check, &Elastic Zoom } +if (ReverseZoom=1) { + Menu, ToolboxMenu, Check, &Reverse Zoom +} + ; Check if AeroZoom is set to run in Startup in the current user startup folder ;IfExist, %A_Startup%\*AeroZoom*.* ;{ @@ -9414,7 +9307,7 @@ Run, http://wandersick.blogspot.com/p/aerozoom-for-windows-7-magnifier.html return UserExperienceSurvey: -Run, http://tinyurl.com/aerozoomsurvey +Run, http://wandersick.blogspot.com/p/aerozoom-user-experience-survey.html return Gmail: @@ -10823,6 +10716,18 @@ if (ElasticZoom=1) { } return +ReverseZoom: +if (ReverseZoom=1) { + ReverseZoom=0 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 0 + Menu, ToolboxMenu, Uncheck, &Reverse Zoom +} else { + ReverseZoom=1 + RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\wandersick\AeroZoom, ReverseZoom, 1 + Menu, ToolboxMenu, Check, &Reverse Zoom +} +return + HoldMiddle: if (holdMiddle=1) { holdMiddle=0 @@ -15585,6 +15490,145 @@ If profileInUse { } return +ZoomIn: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + sendinput ^{Up} + return +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Up} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + ; Gosub, ZoomPad ; causes huge delay in W7HB. also I found out later there is no need for Zoompad while using Live Zoom or Still Zoom of ZoomIt + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Up} + } else { + sendinput ^4 + gosub, WorkaroundFullScrLiveZoom + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + Process, Exist, zoomit.exe + If not errorlevel + { + Msgbox, 262192, ERROR, ZoomIt is not running or zoomit.exe is missing.`n`nPlease click 'Tool > Use ZoomIt as Magnifier'. + return + } + IfNotExist, %A_WorkingDir%\Data\ZoomIt.exe + goto, zoomit + IfWinExist, ahk_class ZoomitClass + { + sendinput {Up} + } Else { + if not zoomItGuidance + Gosub, ZoomItGuidance + Gosub, ZoomPad + if (padTrans>1) { ; no need to wait for zoompad if pad is transparent (ie. 1) + padStayTimeTemp:=padStayTime*2 + Sleep, %padStayTimeTemp% ; after zoompad finishes, wake up + } + Process, Close, ZoomPad.exe ; prevent zoompad frame from appearing in zoomit + process, close, osd.exe ; prevent osd from showing in 'picture' + sendinput ^1 ; here, do not send aerozoom panel to bottom and reactivate it later like others + } +} else { + ; send {LWin down}{NumpadAdd}{LWin up} + ; the following is used instead instead of 'send' for better performance + Gosub, ZoomPad + + ; Mouse-Centered Zoom (center the cursor before zoom) + if (OSver>=6.1) { + ;RegRead,mouseCenteredZoomBit,HKCU,Software\wandersick\AeroZoom,mouseCenteredZoomBit + if mouseCenteredZoomBit + Gosub, MouseCenteredZoom + } + + if numPadAddBit + sendinput #{NumpadAdd} + else + SendInput #{+} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + +ZoomOut: +if paused + return +IfWinExist, ahk_class MagnifierClass ; if zoomit is working, enhance it instead +{ + If (OSver>=6.1 AND (EditionID="Starter" OR EditionID="HomeBasic")) { + sendinput ^4 ; {Down} causes cursor to disappear in those OSes, so just quit. Live Zoom magnificartion level cant be tuned there anyway. + return + } else { + sendinput ^{Down} + return + } +} +IfWinExist, ahk_class ZoomitClass +{ + sendinput {Down} + return +} +if (OSver=6.0 AND !zoomitStill) OR (OSver>=6.1 AND zoomitLive=1) { + Gosub, ZoomPad + IfWinExist, ahk_class MagnifierClass ; ZoomIt Live Zoom for vista and win7 home basic/starter + { + sendinput ^{Down} + } +} else if (OSver<6 OR zoomitStill) { ; still zoom for xp + IfWinExist, ahk_class ZoomitClass + { + sendinput {Down} + } +} else { + ; only enable zoompad when modifier is a mouse button + if (chkMod>4) + { + if zoomPad ; if zoompad is NOT disabled + { + IfWinNotActive, AeroZoom Panel ;if current win is not the panel (zooming over the panel does not require zoompad) + { + RegRead,MagnificationRaw,HKCU,Software\Microsoft\ScreenMagnifier,Magnification ; when zooming out even if already unzoomed, do not activate zoompad + if not (MagnificationRaw=0x64) + { + IfWinExist, AeroZoom Pad ; ZoomPad to prevent accidental clicks + { + WinActivate + } else { + Run, "%A_WorkingDir%\Data\ZoomPad.exe" + } + } + } + } + } + + if numPadSubBit + sendinput #{NumpadSub} + else + SendInput #{-} + IfWinExist, AeroZoom Panel + { + Gosub, ReadValueUpdatePanel + } +} +return + ; Code from AutoHotkey help on GUI ; Note: with this on, if we also want to use 'keyboard shortcuts'(e.g. &Timer = press alt+T to run Timer), we must define a variable in each Gui, Add (e.g. vAnything) and refer to it using the var. Otherwise, strange error would pop up.