It works with the keyboard but not with the mouse! And it is strange, I don't see what I am doing wromg .
The script must scroll down when a key is hold.
Here is full code tested on win7:
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
mousegetpos, preX, preY
loop
{
sleep, 35
exitmain := getkeystate("esc", P)
pan := getkeystate("space", P)
pan := getkeystate("rbutton", P)
mousegetpos, X, Y
if (pan = true) {
tooltip, hello pan
send, {wheeldown 1}
}else{
tooltip, xy %X% %Y%
}
if (exitmain = true) {
ExitApp
}
preX := X
preY := Y
}
esc::
rbutton::
space::
AHK version 1.1.2704
Regards,
Mikhail