I wrote a script, run it, but it stops working after some period of time (~15-30min).
Honestly, I don't understand why it stops working (hotkeys, which I defined in the script, stop working).
Could someone take a look what's the problem in the script?
Here is the script. I run it as an Administrator under Win10 x64 Home OS.
----------------------------------------------------------------------
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon ; No Try Icon in the System Try
#SingleInstance force ;
#Hotstring EndChars `n `t
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode, 2 ; windows title can contain WinTitle anywhere inside it to be a match
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; * [LogiTechMouse]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;---------------------------------------------------------------------
;* [ALL]
;---------------------------------------------------------------------
;-------------------------------------------------------------------
; Wheel Tilt
;-------------------------------------------------------------------
WheelLeft::
send {Volume_Up}
return
WheelRight::
send {Volume_Down}
return
;---------------------------------------------------------------------
;* [Google Chrome]
;---------------------------------------------------------------------
#IfWinActive ahk_exe chrome.exe
;------------------------------
; Arrow Left
;------------------------------
XButton1:: ; Back Button
send {Left}
return ;
;------------------------------
; Arrow Right
;------------------------------
XButton2:: ; Forward Button
;msgbox, XButton2
send {Right}
return ;
;------------------------------
; Page Down (LButton+X1)
;------------------------------
~LButton & ~XButton1::
send {PgDn}
send {ESC}
return ;
;------------------------------
; Page Down (RButton+X1)
;------------------------------
~RButton & XButton1::
send {PgDn}
send {ESC}
return ;
;------------------------------
; Page Up (RButton+X1)
;------------------------------
~LButton & ~XButton2::
send {PgUp}
send {ESC}
return ;
;------------------------------
; Page Up
;------------------------------
~RButton & ~XButton2::
send {PgUp}
send {ESC}
return ;
;----------
; Click
;----------
return
#IfWinActive ; chrome.exe
;---------------------------------------------------------------------
;* [Firefox]
;---------------------------------------------------------------------
#IfWinActive ahk_exe firefox.exe
;------------------------------
; Page Down
;------------------------------
~LButton & XButton1::
send {PgDn}
return ;
;------------------------------
; Page Up
;------------------------------
~LButton & XButton2::
send {PgUp}
return ;
return
Thank you!