Skip to content

Commit

Permalink
Improve speed and reliability
Browse files Browse the repository at this point in the history
  • Loading branch information
chaohershi committed Jun 25, 2019
1 parent 036db52 commit 50de3d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CClose.ahk
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#NoEnv
#NoEnv ; recommended for performance and compatibility with future AutoHotkey releases
#SingleInstance ignore ; allow only one instance of this script to be running
SetWorkingDir %A_ScriptDir%
SendMode Input ; recommended for new scripts due to its superior speed and reliability
SetWorkingDir %A_ScriptDir% ; ensures a consistent starting directory

ScriptName := "CClose"
ScriptVersion := "1.3.10.0"
ScriptVersion := "1.3.11.0"
CopyrightNotice := "Copyright (c) 2018-2019 Chaohe Shi"

ConfigDir := A_AppData . "\" . ScriptName
Expand Down Expand Up @@ -355,9 +356,8 @@ RButton::
KeyWait, RButton, T0.4 ; wait for the right mouse button to be released with timeout set to 0.4 second
if (ErrorLevel == 0) ; if the right mouse button is released during the timeout period, minimize the window
{
; alternative to WinMinimize
Send {Click} ; left click once to remove the remnant right click menu caused by previous clicks, n.b., do not use Send {LButton}, as it would behave inconsistently if the primary and secondary button have been swapped via the system's control panel
PostMessage, 0x112, 0xF020
PostMessage, 0x112, 0xF020 ; alternative to WinMinimize
}
else ; else send a normal right click
{
Expand Down

0 comments on commit 50de3d8

Please sign in to comment.