Hi. I'm new to AutoHotkey (AHK) and see it so useful, because of its functions, not present in Windows nor drivers of modern keyboards and mouses with built-in shortcuts.
I use the A4 Tech mouse model WOP-35
(
http://www.a4tech.com/ennew/download%20 ... num=WOP-35), with 5 buttons (4 are programmables) and 2 wheels (for horizontal and vertical scrolling; the foremost wheel is at the same time the third button, the rear wheel is only wheel).
AHK has no problem with the five buttons. But neither Windows XP Professional or Vista (32 and 64 bit), nor AHK detect independently the rear wheel. Both wheels scroll vertically, and if I assign horizontal scroll to a wheel with AHK, the other makes the same. Now I'm using Windows XP (32 bit).
The mouse A4Tech wheel technology is different from that of Microsoft (Logitech and clones). Microsoft mouse has only one wheel that tilts for horizontal scrolling. Windows Vista support is for Microsoft's mouse, not for others. Both makes the same. Difference i$ price.
I can't use simultaneously AHK and the mouse driver because this (Amoumain.exe) interferes that, and my script doesn't function.
The ideal solution is uninstall the driver but, is there any way AHK recognize the rear wheel? I've tried with WM_HSCROLL and WM_VSCROLL in vain. The next is my script which uses keyboard and mouse at time:
Code:
;Foremost wheel horizontal scroll
~RButton & WheelUp:: ;Scroll left
ControlGetFocus, fcontrol, A
Loop 3 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 0, 0, %fcontrol%, A ;0x114 es WM_HSCROLL (Windows Message Horizontal Scroll) and the 0 after it is SB_LINELEFT (Scroll Bar Line Left).
return
~RButton & WheelDown:: ;Scroll right
ControlGetFocus, fcontrol, A
Loop 3 ; <-- Increase this value to scroll faster.
SendMessage, 0x114, 1, 0, %fcontrol%, A ;0x114 es WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return
;Left, Middle and Right button = Windows XP Professional (or Vista).
XButton1::WinMinimize, A ;Minimizes active window. Similar to ::Send !{Space}n
XButton2::Send !{F4} ;Closes active window or dialog box.
;WINDOWS KEY:
#Lbutton::^c ;Copy.
#Mbutton::^x ;Cut.
#Rbutton::^v ;Paste.
~#XButton1::Send ^z ;Undo. Only in Notepad: "Redo" too.
~#XButton2::Send ^y ;Redo. It doesn't function in Notepad.
;CTRL KEY:
;Left button = Windows XP (non continued selection). Foremost wheel = Windows (zoom). Right button = personal application (Babylon).
~^Mbutton::Send ^a ;Selects all, in Spanish Windows replace "e" instead of "a". In Microsoft Word maybe you must double clic.
^XButton1::Send ^{Home}
^XButton2::Send ^{End}
;SHIFT KEY:
;Left button = Windows XP or Vista (selects until).
~+Mbutton::WinMaximize, A ;Maximizes active window. Similar to ::Send !{Space}x.
+Rbutton::Send !{Enter} ; Gets "Properties" dialog box.
~+XButton1::WinRestore, A ;Restores active window. Similar to ::Send !{Space}r.
~+XButton2::WinMinimizeAll ;Minimizes all windows (shows desktop). Similar to ::Send #d.
;ALT KEY:
~!Lbutton::Run calc.exe ;Gets Windows Calculator.
; FOR MEDIA PLAYER:
~!Mbutton::Send {Media_Stop} ;Stop.
~!Rbutton::Send {Media_Play_Pause} ;Play/Pause.
!XButton1::Send {Media_Prev} ;Previous.
!XButton2::Send {Media_Next} ;Next.
ScrollLock::Run notepad.exe
;FUNCTION KEYS:
F8::Run explorer.exe
F9::Run regedit.exe
F10::Run iexplore.exe
F12::Run WINWORD.exe
I recommend to you that you buy a keyboard and a mouse with the greater number of shortcut keys, and assign AHK hotkeys to these.
Sorry my English.