Вот еще скриптик.
Может что то используешь из него для себя.
Содержание поймешь.
Код:
; AutoHotkey Version: 1.x
; Language: English
; Platform: Win9x/NT
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
;
#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.
#Persistent
#NoTrayIcon
SendMode Input
SetTitleMatchMode RegEx
~WheelUp::
IfWinActive, ahk_class WindowsForms10.Window
{
GetKeyState, state, mButton
if state = u
Send {Up}
}
return
~WheelDown::
IfWinActive, ahk_class WindowsForms10.Window
{
GetKeyState, state, mButton
if state = u
Send {Down}
}
return
~MButton::
gosub,nazad
if stat= kor
Send {Enter}
if stat= dln
{
Send {Control down}
sleep,30
Send {0}
sleep,30
Send {Control up}
}
return
~g::
gosub,nazad1
if stat= kor
Send {Enter}
if stat= dln
{
Send {Control down}
sleep,30
Send {0}
sleep,30
Send {Control up}
}
return
~f4::
exitapp
return
nazad:
Loop
{
Sleep, 1
GetKeyState, state, MButton, P
if state = U ; The key has been released, so break out of the loop.
break
tim=%A_Index%
}
if tim <= 30
{
;tooltip, %tim%
stat= kor
return
}
if tim >= 30
{
;tooltip, %tim% "2"
stat= dln
}
return
nazad1:
Loop
{
Sleep, 1
GetKeyState, state, g, P
if state = U ; The key has been released, so break out of the loop.
break
tim=%A_Index%
}
if tim <= 30
{
;tooltip, %tim%
stat= kor
return
}
if tim >= 30
{
;tooltip, %tim% "2"
stat= dln
}
return