Skip to content

Commit 9dce9a3

Browse files
authored
Add files via upload
1 parent 88de003 commit 9dce9a3

File tree

2 files changed

+708
-0
lines changed

2 files changed

+708
-0
lines changed

Data/AeroZoom_MouseL.ahk

+354
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,354 @@
1+
; AeroZoom by wanderSick | http://wandersick.blogspot.com
2+
3+
verAZ = v1.7
4+
paused = 0
5+
6+
RegRead,OSver,HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion,CurrentVersion
7+
if not (OSver>6) {
8+
MsgBox You're not using Windows 7 or later. Expect abnormal behaviors.
9+
}
10+
11+
if not A_IsAdmin
12+
{
13+
DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_AhkPath
14+
, str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1) ; Last parameter: SW_SHOWNORMAL = 1
15+
ExitApp
16+
}
17+
18+
~LButton & WheelUp::
19+
if not (paused=1) {
20+
send {LWin down}{NumpadAdd}{LWin up}
21+
}
22+
return
23+
24+
~LButton & WheelDown::
25+
if not (paused=1) {
26+
send {lwin down}{NumpadSub}{lwin up}
27+
}
28+
return
29+
30+
; Run,"%windir%\system32\reg.exe" add HKCU\Software\Microsoft\ScreenMagnifier /v Magnification /t REG_DWORD /d 0x64 /f,,Min
31+
32+
~LButton & MButton::
33+
if not (paused=1) {
34+
Process, Close, magnify.exe
35+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Magnification, 0x64
36+
Sleep, 10
37+
Run,"%windir%\system32\magnify.exe",,
38+
}
39+
return
40+
41+
~LButton & RButton::
42+
Gui, Destroy
43+
; Get Mouse Position
44+
MouseGetPos, xPos, yPos
45+
xPos2 := xPos - 15
46+
yPos2 := yPos - 160
47+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,Invert
48+
if (magnifierSetting=0x1) {
49+
ColorCurrent = On
50+
ColorNext = Off
51+
} else {
52+
ColorCurrent = Off
53+
ColorNext = On
54+
}
55+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowMouse
56+
if (magnifierSetting=0x1) {
57+
MouseCurrent = On
58+
MouseNext = Off
59+
} else {
60+
MouseCurrent = Off
61+
MouseNext = On
62+
}
63+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowFocus
64+
if (magnifierSetting=0x1) {
65+
KeyboardCurrent = On
66+
KeyboardNext = Off
67+
} else {
68+
KeyboardCurrent = Off
69+
KeyboardNext = On
70+
}
71+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowCaret
72+
if (magnifierSetting=0x1) {
73+
TextCurrent = On
74+
TextNext = Off
75+
} else {
76+
TextCurrent = Off
77+
TextNext = On
78+
}
79+
80+
; Adds Buttons
81+
Gui, -MinimizeBox -MaximizeBox ; Disable Minimize and Maximize button on Title bar
82+
Gui, Font, s8, Arial
83+
Gui, Add, Button, x15 y10 w110 h43 gColor, &Color %ColorCurrent% => %ColorNext%
84+
Gui, Add, Button, x15 y53 w110 h43 gMouse, &Mouse %MouseCurrent% => %MouseNext%
85+
Gui, Add, Button, x15 y96 w110 h43 gKeyboard, &Keyboard %KeyboardCurrent% => %KeyboardNext%
86+
Gui, Add, Button, x15 y139 w110 h43 gText, &Text %TextCurrent% => %TextNext%
87+
Gui, Add, Button, x15 y184 w54 h28 gShowMagnifier, &Show
88+
Gui, Add, Button, x71 y184 w54 h28 gKillMagnifier, Kil&l
89+
Gui, Add, Button, x15 y214 w54 h28 gDefault, &Reset
90+
Gui, Add, Button, x71 y214 w54 h28 gCalc, C&alc
91+
Gui, Add, Button, x15 y244 w54 h28 gDraw, &Draw
92+
Gui, Add, Button, x71 y244 w54 h28 gType, T&ype
93+
; Gui, Add, Button, x71 y214 w54 h28 gHide, &__
94+
95+
if (paused=0) {
96+
pausedMsg = &off
97+
} else {
98+
pausedMsg = &on
99+
}
100+
101+
Gui, Add, Button, x15 y274 w35 h22 gPauseScript, %pausedMsg%
102+
Gui, Add, Button, x52 y274 w36 h22 gHide, h&ide
103+
Gui, Add, Button, x90 y274 w35 h22 gBye, &quit
104+
105+
; Adds Texts
106+
Gui, Font, s10, Tahoma
107+
Gui, Add, Text, x28 y307 w100 h17 vTxt, AeroZoom %verAZ%
108+
Gui, Font, norm
109+
110+
; Set Title, Window Size and Position
111+
Gui, Show, h361 w140 x%xPos2% y%yPos2%, `r
112+
113+
; Always On Top
114+
Gui, +AlwaysOnTop
115+
116+
; Adds Menus
117+
Menu, HelpMenu, Add, &Instructions, Instruction
118+
Menu, HelpMenu, Add, &Check for update, CheckUpdate
119+
Menu, HelpMenu, Add, &Read me, Readme
120+
Menu, HelpMenu, Add, &About, HelpAbout
121+
122+
; Menu, FileMenu, Add, &Show magnifier`t[Left]+[Wheel-up], EnableAZ
123+
; Menu, FileMenu, Add, &Kill magnifier`t, DisableAZ
124+
; Menu, FileMenu, Add, &Restore defaults, ResetDefaultsAZ
125+
; Menu, FileMenu, Add, &Reset zoom`t[Left]+[Middle], ResetZoomLevelAZ
126+
; Menu, FileMenu, Add, &Pause / Resume`t[Alt]+[O], PauseScriptAZ
127+
Menu, FileMenu, Add, &Hide this`t[ESC], HideAZ
128+
Menu, FileMenu, Add, E&xit AeroZoom`t[Alt]+[Q], ExitAZ
129+
130+
; Create the menu bar by attaching the sub-menus to it:
131+
Menu, MyBar, Add, &File, :FileMenu
132+
Menu, MyBar, Add, &Help, :HelpMenu
133+
134+
; Attach the menu bar to the window:
135+
Gui, Menu, MyBar
136+
Loop 6
137+
return
138+
139+
ShowMagnifier:
140+
WinRestore Magnifier
141+
Run,"%windir%\system32\magnify.exe",,
142+
Gui, Destroy
143+
return
144+
145+
KillMagnifier:
146+
; Run,"%windir%\system32\taskkill.exe" /f /im magnify.exe,,Min
147+
Process, Close, magnify.exe
148+
Gui, Destroy
149+
return
150+
151+
Default:
152+
Process, Close, magnify.exe
153+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Magnification, 0x64
154+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Invert, 0x0
155+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowCaret, 0x0
156+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowFocus, 0x0
157+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowMouse, 0x1
158+
Sleep, 10
159+
Run,"%windir%\system32\Magnify.exe",,
160+
Gui, Destroy
161+
return
162+
163+
Calc:
164+
IfWinExist Calculator
165+
WinActivate
166+
else
167+
Run,"%windir%\system32\calc.exe",,
168+
Gui, Destroy
169+
return
170+
171+
Draw:
172+
IfWinExist Snipping Tool
173+
WinActivate
174+
else
175+
Run,"%windir%\system32\SnippingTool.exe",,
176+
Gui, Destroy
177+
return
178+
179+
Type:
180+
IfWinExist Document - WordPad
181+
WinActivate
182+
else
183+
Run,"%ProgramFiles%\Windows NT\Accessories\wordpad.exe",,
184+
Gui, Destroy
185+
return
186+
187+
Color:
188+
Process, Close, magnify.exe
189+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,Invert
190+
if (magnifierSetting=0x1) {
191+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Invert, 0x0
192+
} else {
193+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Invert, 0x1
194+
}
195+
Sleep, 10
196+
Run,"%windir%\system32\Magnify.exe",,
197+
Gui, Destroy
198+
Return
199+
200+
Mouse:
201+
Process, Close, magnify.exe
202+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowMouse
203+
if (magnifierSetting=0x1) {
204+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowMouse, 0x0
205+
} else {
206+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowMouse, 0x1
207+
}
208+
Sleep, 10
209+
Run,"%windir%\system32\Magnify.exe",,
210+
Gui, Destroy
211+
Return
212+
213+
Keyboard:
214+
Process, Close, magnify.exe
215+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowFocus
216+
if (magnifierSetting=0x1) {
217+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowFocus, 0x0
218+
} else {
219+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowFocus, 0x1
220+
}
221+
Sleep, 10
222+
Run,"%windir%\system32\Magnify.exe",,
223+
Gui, Destroy
224+
Return
225+
226+
Text:
227+
Process, Close, magnify.exe
228+
RegRead,magnifierSetting,HKCU,Software\Microsoft\ScreenMagnifier,FollowCaret
229+
if (magnifierSetting=0x1) {
230+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowCaret, 0x0
231+
} else {
232+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowCaret, 0x1
233+
}
234+
Sleep, 10
235+
Run,"%windir%\system32\Magnify.exe",,
236+
Gui, Destroy
237+
Return
238+
239+
PauseScript:
240+
if (paused=0) {
241+
paused = 1
242+
} else {
243+
paused = 0
244+
}
245+
Gui, Destroy
246+
return
247+
248+
Hide:
249+
Gui, Destroy
250+
return
251+
252+
Bye:
253+
Process, Close, magnify.exe
254+
ExitApp
255+
return
256+
257+
PauseScriptAZ:
258+
if (paused=0) {
259+
paused = 1
260+
} else {
261+
paused = 0
262+
}
263+
return
264+
265+
ResetZoomLevelAZ:
266+
Process, Close, magnify.exe
267+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Magnification, 0x64
268+
Sleep, 10
269+
Run,"%windir%\system32\Magnify.exe",,
270+
return
271+
272+
ResetDefaultsAZ:
273+
Process, Close, magnify.exe
274+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Magnification, 0x64
275+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, Invert, 0x0
276+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowCaret, 0x0
277+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowFocus, 0x0
278+
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\ScreenMagnifier, FollowMouse, 0x1
279+
Sleep, 10
280+
Run,"%windir%\system32\Magnify.exe",,
281+
return
282+
283+
EnableAZ:
284+
WinRestore Magnifier
285+
Run,"%windir%\system32\magnify.exe",,
286+
return
287+
288+
DisableAZ:
289+
Process, Close, magnify.exe
290+
return
291+
292+
HideAZ:
293+
Gui, Destroy
294+
return
295+
296+
ExitAZ:
297+
Process, Close, magnify.exe
298+
ExitApp
299+
return
300+
301+
Instruction:
302+
Gui, 2:+owner1 ; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
303+
Gui +Disabled ; Disable main window.
304+
Gui, 2:Font, s10, Arial bold,
305+
Gui, 2:Add, Text, , Mouse Buttons Instructions (Right-handed version)
306+
Gui, 2:Font, s10, Arial,
307+
Gui, 2:Add, Text, , This panel`t=> [Left] + [Right]`nShow magnifier`t=> [Left] + [Wheel-up]`nReset zoom`t=> [Left] + [Middle]`nZoom in `t=> hold [Left] + [Wheel-up]`nZoom out`t=> hold [Left] + [Wheel-down]
308+
Gui, 2:Font, norm,
309+
Gui, 2:Add, Button, x256 y138 h30 w60 Default, OK
310+
Gui, 2:Show, , Instructions
311+
return
312+
313+
Readme:
314+
Run,"%windir%\system32\notepad.exe" "%A_WorkingDir%\Data\readme.txt"
315+
return
316+
317+
CheckUpdate:
318+
GuiControl,1:,Txt,- Please Wait -
319+
Gui, -AlwaysOnTop ; To let the update check popup message show on top after checking, which is done thru batch and VBScript.
320+
RunWait, "%comspec%" /c "%A_WorkingDir%\Data\_updateCheck.bat" /quiet, , Min
321+
Gui, +AlwaysOnTop
322+
GuiControl,1:,Txt, AeroZoom %verAZ%
323+
WinActivate
324+
Return
325+
326+
HelpAbout:
327+
Gui, 2:+owner1 ; Make the main window (Gui #1) the owner of the "about box" (Gui #2).
328+
Gui +Disabled ; Disable main window.
329+
Gui, 2:Font, s10, Arial bold,
330+
Gui, 2:Add, Text, , AeroZoom %verAZ%
331+
; Gui, 2:Font, norm,
332+
Gui, 2:Font, s10, Arial,
333+
Gui, 2:Add, Text, , Mouse Control for Windows 7 Magnifier`n-- written using AutoHotKey`n`nIf you have any suggestion, please contact`nme at wandersick@gmail.com
334+
Gui, 2:Font, norm,
335+
Gui, 2:Add, Button, x206 y130 h30 w60 Default, OK
336+
Gui, 2:Show, , About
337+
return
338+
339+
2ButtonOK: ; This section is used by the "about box" above.
340+
2GuiClose: ; On "Close" button press
341+
2GuiEscape: ; On ESC press
342+
Gui, 1:-Disabled ; Re-enable the main window (must be done prior to the next step).
343+
Gui, Destroy ; Destroy the about box.
344+
return
345+
346+
GuiEscape: ; On ESC press
347+
Gui, Destroy ; Hide (destroy) the Gui
348+
return
349+
350+
GuiClose: ; On "Close" button press
351+
Gui, Destroy ; Hide (destroy) the Gui
352+
return
353+
354+
; AeroZoom by wanderSick | http://wandersick.blogspot.com

0 commit comments

Comments
 (0)