Page 1 of 1

Shift + Wheel

Posted: 05 Jan 2017, 13:09
by ozzii
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:

Re: Shift + Whell

Posted: 06 Jan 2017, 11:12
by aztec3
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.

Re: Shift + Whell

Posted: 06 Jan 2017, 13:17
by ozzii
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

Re: Shift + Whell

Posted: 06 Jan 2017, 15:18
by Tup
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

Re: Shift + Whell

Posted: 07 Jan 2017, 04:15
by ozzii
The problem is not the tooltip, but the mouseclick!
The tooltip is working from the start.

Re: Shift + Whell

Posted: 07 Jan 2017, 08:24
by Tup
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