Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

mouse wheelup question doing my head in



  • Please log in to reply
4 replies to this topic
defoo
  • New members
  • 2 posts
  • Last active: Mar 06 2016 09:34 AM
  • Joined: 08 Oct 2015

Hi there been using autohotkey to do a few things to make my life easyer but i've hit a wall and would love some help.

what I'm trying to do is make my mouse wheel up do 3 cmds so if I roll up it will press U then if I do it again it will press I, then roll up again and press o

 

i've tried using is get keystate but could get it to work that way has anyone got a help file link would be great.

 

cheers.

defoo



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012
✓  Best Answer

Do you want one after the other to happen, so to do Send o you need to have it do Send u and Send i, or do you want to be able to select each one independently?

 

The former:

WheelUp::
count++
If count > 3
count:=1
If count=1
Send u
If count=2
Send i
If count=3
Send o
return

 

Latter: (more complex, and several ways to handle it)

WheelUp::
count++
If count=1
SetTimer, send_letter, -500
return
 
send_letter:
If count=1
Send u
If count=2
Send i
If count=3
Send o
count:=0
return

 

Both codes are untested, and I debated about which method would be best to do for the latter using a WheelUp. I opted for the SetTimer and having it run a label only one time, half a second after you first hit WheelUp.

 

You might consider using If count>=3 inside the latter code set so that if you end up hitting the WheelUp 4 or more times, it will still send o.

 

Feel free to ask any questions about how these codes work, and especially so if they don't seem to be working for you.



defoo
  • New members
  • 2 posts
  • Last active: Mar 06 2016 09:34 AM
  • Joined: 08 Oct 2015

thank you buddy, works like a charm it was doing my head in trying to get that to work.



ajc1981
  • Members
  • 14 posts
  • Last active: Nov 16 2015 07:59 PM
  • Joined: 31 Aug 2015

Ok thank you for  the help exaskryz. I've had some time over the last few days now and been testing  both them scripts you made the second one don't work well with what i'm trying to do. the first one works, But the problem is sometimes it's very sensitive and I fined myself focusing on 1 scroll up to much. In a way it's not working for what i'm trying to do, if the wheel up function was disabled where the scroll wheel clicks it's classed as 1 scroll if you know what i mean this would have worked out well. so back to the drawing board again see if i can sort it..



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

You can consider setting a range for the values in the first one. If (count>10 && count<=20) would be a range of 11-20.