AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CTRL+ALT+ MouseWheel up/Down

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Mon Dec 19, 2005 8:51 pm    Post subject: CTRL+ALT+ MouseWheel up/Down Reply with quote

Why doesn't this work?

Code:
~WHEELUP::
If (GetKeyState("Control") AND GetKeyState("Alt"))
   msgbox,16,,Up
return

~WHEELDOWN::
If (GetKeyState("Control") AND GetKeyState("Alt"))
   msgbox,16,,Down
return


I also tried this:
Code:
~WHEELUP::
   GetKeyState, AltKey, Alt
   GetKeyState, CtrlKey, Ctrl
If (CtrlKey = "D" and AltKey = "D")
   msgbox,UP
return


The following works, but I'd like to be able to hold down the CTRL+ALT keys and roll the mouse, instead of repeatedly hitting those keys.
Code:
^!WHEELUP::Msgbox,Up
^!WHEELDOWN::Msgbox,Down!
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Laszlo



Joined: 14 Feb 2005
Posts: 4016
Location: Pittsburgh

PostPosted: Mon Dec 19, 2005 9:36 pm    Post subject: Reply with quote

If looks like Windows defines Ctrl-Wheel Up/Down (regardless of the state of Alt) for something (in IE6 View/TextSize increase or decrease, in Word zoom + or -10%), which takes precedence over your WHEELUP/DOWN hotkeys. I found, however no problems with
Code:
~^!WHEELUP::
   TrayTip,,Up
return

~^!WHEELDOWN::
   TrayTip,,Down
Return
I don't need to press Ctrl or Alt repeatedly (XP SP2).
Back to top
View user's profile Send private message
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Mon Dec 19, 2005 10:52 pm    Post subject: Reply with quote

Try this one. It should show you that you do have to press CTRL+ALT repeatedly. I'm also on XP SP2.

Code:
~^!WHEELUP::
i++
   TrayTip,,%i%
return

~^!WHEELDOWN::
i--
   TrayTip,,%i%
Return
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Dec 20, 2005 3:38 am    Post subject: Reply with quote

Short answer: One work-around I've found is to add the line #InstallKeybdHook to the script.

More detail: Without #InstallKeybdHook, your example appears to be sensitive to which modifier you press down first: Ctrl or Alt. If you press Alt down first, it works. But in the opposite order it doesn't.

I think this probably has something to do with the unusual way the OS treats the Alt key (in conjuction with alt-tabbing, menu bar activation, and other low-level features). I've also observed interactions between Ctrl and Alt, such as the fact that Ctrl seems to suppress Alt's native function of activating the menu bar.
Back to top
View user's profile Send private message Send e-mail
Guest






PostPosted: Tue Dec 20, 2005 7:15 am    Post subject: Reply with quote

http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx

download and install the alt-tab replacement. I don't know if you can use the scroll wheel but you can use the arrows and you can click on the icons, very handy.
Back to top
ranomore



Joined: 06 Nov 2004
Posts: 178
Location: Salt Lake City, UT

PostPosted: Tue Dec 20, 2005 5:35 pm    Post subject: Reply with quote

@Chris - Thanks! I hadn't tried holding down the keys in the opposite order. Smile
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group