Total Commander Forum Index Total Commander
Форум поддержки пользователей Total Commander
Сайты: Все о Total Commander | Totalcmd.net | Ghisler.com | RU.TCKB
 
 RulesRules   SearchSearch   FAQFAQ   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Single Post  Topic: Аналог Tab wheel scroll (аддон для Fx) 
Author Message
mf-zl



PostPosted: Mon Oct 12, 2009 01:22    Post subject: Reply with quote

А так ?
Code:
#SingleInstance force

; ------------------------------------------------------------------------------
; >>> Прокрутка колесом мыши вкладок TC
; ------------------------------------------------------------------------------
#IfWinActive ahk_class TTOTAL_CMD

WheelUp::
WheelDown::
  CoordMode, Mouse, Relative
  MouseGetPos,,,, ControlClass
  If RegExMatch(ControlClass, "TMyPanel[47]")
    Send, % "^" (A_ThisHotkey = "WheelDown" ? "" : "+") "{TAB}"
  Else, Send, % "{" A_ThisHotkey "}"
Return

#IfWinActive

; ------------------------------------------------------------------------------
; >>> Прокрутка окна под курсором мыши без активации
; ------------------------------------------------------------------------------
WheelUp::
WheelDown::
  If(A_ThisHotkey!=A_PriorHotkey || A_TimeSincePriorHotkey>40) ; Определить скорость
    Scroll:= A_ThisHotkey="WheelUp" ? 120<<16 : -120<<16       ; вращения колеса и
  Else                                                         ; задать скорость прокрутки.
    Scroll:= A_ThisHotkey="WheelUp" ? 240<<16 : -240<<16
  CoordMode, Mouse, Screen
  MouseGetPos, mX, mY
  WinID:=DllCall("WindowFromPoint", "int", mX, "int", mY)      ; ID (handle) окна под мышью.
  NextID:=DllCall("WindowFromPoint", "int", mX, "int", mY-20)

  SendMessage, 0x20A, %Scroll%, (mY<<16)|mX,, ahk_id %WinID%   ; 0x20A = WM_MOUSEWHEEL
  If (!ErrorLevel && (WinID != NextID))
    SendMessage, 0x20A, %Scroll%, (mY<<16)|mX,, ahk_id %NextID%
Return
View user's profile Send private message Visit poster's website


Powered by phpBB © 2001, 2005 phpBB Group