AutoHotkey Community

It is currently May 27th, 2012, 7:44 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: September 25th, 2006, 8:34 pm 
Offline

Joined: September 25th, 2006, 7:13 pm
Posts: 6
Location: Peru
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.

_________________
¿Cuándo traducimos AHK al español?


Last edited by Cholito on November 15th, 2008, 12:08 am, edited 4 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2006, 3:17 am 
Offline

Joined: August 15th, 2005, 7:15 am
Posts: 107
Location: North Carolina
There is described in the manual the procedure for finding the codes for keys which are not known. You can find it under "Keyboard Control > Key List". However, I strongly suspect it is not supported. I think the only mouse events supported in AHK right now are explained there. More common mouse buttons (logitech and microsoft) are not supported, yet anyway.

Good Luck,

Bob


Report this post
Top
 Profile  
Reply with quote  
PostPosted: September 26th, 2006, 5:51 pm 
Offline

Joined: September 25th, 2006, 7:13 pm
Posts: 6
Location: Peru
Hi Terrapin. I've tried with Mouse Hook and Keyboard Hook. Unfortunately, they don't recognize the second wheel.
I wish assign horizontal scrolling to foremost wheel (middle button), and vertical scrolling to rear wheel. AHK (via menu item "View -> Key history and script info") recognizes the wheels, but the script, using the detected "virtual key" and "scan code", doesn't function, neither Windows XP nor Windows Vista; notwithstanding Vista offers support for vertical scrolling. The next are the detected values by AHK:
FOREMOST WHEEL:
Upward: vk: 9F, sc: 001
Downward: vk: 9E, sc: 001
REAR WHEEL:
Upward: vk: 9F, sc: 002
Downward: vk: 9E, sc: 002

The next is my non functional script:
Code:
;HORIZONTAL SCROLLING TO FOREMOST WHEEL:
vk9Fsc001:: ;SCROLL LEFT.
ControlGetFocus, control, A
SendMessage, 0x114, 0, 0, %control%, A ;0x114 es WM_HSCROLL (Windows Message Horizontal Scroll) and the 0 after it is SB_LINELEFT (Scroll Bar Line Left).
return

vk9Esc001:: ;SCROLL RIGHT.
ControlGetFocus, control, A
SendMessage, 0x114, 1, 0, %control%, A ;0x114 es WM_HSCROLL and the 1 after it is SB_LINERIGHT.
return

;VERTICAL SCROLLING TO REAR WHEEL:
vk9Fsc002:: ;SCROLL UP.
ControlGetFocus, control, A
SendMessage, 0x115, 0, 0, %control%, A ;0x115 is WM_VSCROLL and the 0 after it is SB_LINEUP.
return

vk9Esc002:: ;SCROLL DOWN.
ControlGetFocus, control, A
SendMessage, 0x115, 1, 0, %control%, A ;0x115 es WM_VSCROLL and the 1 after it is SB_LINEDOWN.
return
AHK can't discriminate independently both wheels.
Drivers run in deeper level than AHK, yet.
Thanks

Sorry my English.

_________________
¿Cuándo traducimos AHK al español?


Last edited by Cholito on November 21st, 2008, 11:34 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 26th, 2006, 10:43 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Although I don't know if it will help in this case, you might take a look at DLLCall: Support for Human Interface devices


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Not work
PostPosted: December 21st, 2007, 1:42 pm 
Offline

Joined: October 28th, 2007, 10:41 am
Posts: 75
Location: Hungary, Érd
Chris wrote:
Although I don't know if it will help in this case, you might take a look at DLLCall: Support for Human Interface devices

Not work, see: http://www.autohotkey.com/forum/viewtop ... 109#166109


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], HotkeyStick, SKAN, tomL, Yahoo [Bot] and 72 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group