Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

biding keys to mouse wheel


  • Please log in to reply
6 replies to this topic
hobbes322
  • Guests
  • Last active:
  • Joined: --
Hello, I literally just heard of auto hotkey and I am also not super computer savvy so please forgive my potential stupidity with this question...but is it possible to bind certain keys to mouse wheel for games?

To be more specific, I play Guild Wars 2 and it doesnt let you bind anything to mouse wheel up or down. I have heard of people bindind things to keys on their keyboard and then binding that key to mousewheel via software. Also what I am trying to do is not an exploit within the game, so please dont think I am asking for help to cheat.

Leef_me
  • Moderators
  • 8510 posts
  • Last active: Sep 10 2015 05:50 AM
  • Joined: 08 Apr 2009
The '1' is not required but you can change it to a higher number if needed.
This script
I suggest first trying it with notepad active, and enough lines to make the vertical scrollbar visible/enabled.

f1::
send {WheelDown 1}
return

f2::
send {WheelUp 1}
return


GodlyCheese
  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
Leef, I don't think this user wanted to make a HotKey act as the MouseWheel. I think this user wanted to turn the MouseWheel into a HotKey to perform other actions.

The Gaming subforums here seem to be 99.9% dedicated to cheating, so no problem. However they're pretty dead so if you want your question answered don't post there. Hobbes, you should read the Quick Reference material in the Help File that came with your AHK install, this question is answered in the HotKeys subsection. I'll provide a sample of code that you can change to suit your needs.

WheelUp::
Send {F1}
return

WheelDown::
Send {F2}
return

To alter the script I provided just change what comes after the Send command, remove the F1/F2 and replace it with what you want. If the Send command doesn't work with your game then change it to SendPlay or SendInput. This script can be changed even more ways, like setting a different action to scrolling two notches down in a given timeframe or performing more complex actions. You could even modify it so this only comes into effect when CapsLock or NumLock is active, so you can scroll normally when it isn't or vice versa.

If you tell us what you'd like to do then we can be more helpful.

  • Guests
  • Last active:
  • Joined: --
Im also trying to do this for the same game.

Only difference is what i want to bind mousewheel up down along with shift, ctrl, and alt modifiers.

If anyone knows how to do that, that would be great, because i dont understand scripts at all.

GodlyCheese
  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
!WheelDown::         ;! is equal to Alt in AHK hotkeys, so this is Alt + WheelDown
Send {F1}            ;Change this to whatever you want the hotkey to do
return               ;This ends the function of the hotkey, it can be used repeatedly though

Read this thoroughly <!-- m -->http://www.autohotke...ocs/Hotkeys.htm<!-- m -->

  • Guests
  • Last active:
  • Joined: --
the two things I am trying to achieve is have mouse wheel down perform Dodge and mouse wheel up perform weapon swap. In Guild Wars 2 dodge is very important to be able to do on the fly during combat, I currently have it bound to mouse 4 which works well but I would like to free up mouse 4 for something else. Also weapon swap is by default bound to tilde which is, for me, a pain to press during combat. Basically, I am trying to take two very important things to be able to perform very quickly in combat to be bound to mouse wheel for absolute easy access.

GodlyCheese
  • Members
  • 719 posts
  • Last active: Nov 11 2014 07:12 PM
  • Joined: 30 Aug 2012
And you can't do that from what I just gave you...?

I'll do half of it for you, you figure out the other half.

WheelUp::
Send {~}
return

There is no conditional on this, every notch you scroll up with your mouse wheel will create a ~ which will translate into Weapon Swap. You should be able to figure out how to change this to work for WheelDown -> Dodge, apply logic. This is simple. Read the help file. To exit a script quickly make a hotkey cause ExitApp, I like to do "Esc::ExitApp" (so pressing Esc exits the app, just add what's in the quotes to your script and it'll happen.)