Shift + Wheel

Get help with using AutoHotkey and its commands and hotkeys
ozzii
Posts: 322
Joined: 30 Oct 2013, 06:04

Shift + Wheel

05 Jan 2017, 13:09

Hi,

I can't make work this really simple script.
The shift+Wheel isn't working, but i can see the tooltip :

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance Force
#Persistent
#MaxHotkeysPerInterval 120
 
Process, Priority, , H

+WheelUp::
   ToolTip, UP
		MouseClick, WheelUp,,,8
	tooltip
Return
+WheelDown::
   ToolTip, DOWN
		MouseClick, WheelDown,,,8
	tooltip
Return
But without the +it's working :oops:
Last edited by Nextron on 07 Jan 2017, 08:42, edited 2 times in total.
Reason: Title typo
User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: Shift + Whell

06 Jan 2017, 11:12

Hmmm...doesn't work for me even with removing the "!".

Also, "!" is for "Alt" and "+" is for "Shift", if that helps any.

UPDATE: It seems the tooltip was flashing by so fast, but if I add a "Sleep, 1000" after the MouseClick, I see the tooltip (and I changed "!" to "+" so it is using SHIFT too). Can't say that it click 8 times though.
ozzii
Posts: 322
Joined: 30 Oct 2013, 06:04

Re: Shift + Whell

06 Jan 2017, 13:17

You are right, it was a wrong copy/past.

Yes you can see the tooltip, but the whell is not done 8 times.
For me, not even once. The navigation bar doesn't move.

Edit : edited the code from the first post
Tup
Posts: 59
Joined: 25 Jun 2015, 13:10

Re: Shift + Whell

06 Jan 2017, 15:18

I took the example straight from the documentation:
https://autohotkey.com/docs/commands/ToolTip.htm

Tooltips stays alive now for 2 seconds
Succes
Tup

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance Force
#Persistent
#MaxHotkeysPerInterval 120
 
Process, Priority, , H

+WheelUp::
	ToolTip, UP
	SetTimer, RemoveToolTip, 2000
	MouseClick, WheelUp,,,8
Return
	
+WheelDown::
   ToolTip, DOWN
	SetTimer, RemoveToolTip, 2000
	MouseClick, WheelDown,,,8
Return

RemoveToolTip:
	SetTimer, RemoveToolTip, Off
	ToolTip
return
ozzii
Posts: 322
Joined: 30 Oct 2013, 06:04

Re: Shift + Whell

07 Jan 2017, 04:15

The problem is not the tooltip, but the mouseclick!
The tooltip is working from the start.
Tup
Posts: 59
Joined: 25 Jun 2015, 13:10

Re: Shift + Whell

07 Jan 2017, 08:24

Hmmm, you're right
I experimented with your script, turning the wheel seems to generate hundreds of hotkey-triggerings.
I tried the $-sign trick, but no change.
I was able to cut off this stream though, by adding a message box.
After pressing OK the wheel seems to turn 8 notches as desired.
So I think the solution is somewhere in that direction.
I am afraid I reached the limits of knowledge.
Somebody with more skills has to help you further
Succes
Tup

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance Force
#Persistent
#MaxHotkeysPerInterval 120
 
Process, Priority, , H

$+WheelUp::
MsgBox, this is A_EventInfo:  %A_EventInfo%
	ToolTip, UP
	SetTimer, RemoveToolTip, 2000
	MouseClick, WheelUp,,, 8
Return
	
$+WheelDown::
MsgBox, this is A_EventInfo:  %A_EventInfo%
	ToolTip, DOWN
	SetTimer, RemoveToolTip, 2000
	MouseClick, WheelDown,,, 8
Return

RemoveToolTip:
	SetTimer, RemoveToolTip, Off
	ToolTip
return

	

Return to “Ask For Help”

Who is online

Users browsing this forum: ANDY123, Bing [Bot] and 254 guests