Skip to content

Commit

Permalink
Fix unexpected termination when activating help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
chaohershi committed Jul 12, 2018
1 parent a64383c commit 8983abc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
12 changes: 6 additions & 6 deletions Close It.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ Suspend, Toggle
Return

HelpMsg:
MsgBox,
MsgBox, 0, Help,
(

Middle click + title bar = close window.
Right click + title bar = minize window.
Left click and hold + title bar = toggle window always on top.
Double press + Esc key = close active window.
Hold left click + title bar = toggle window always on top.
Double press + Esc key = close active window.
Right click + taskbar button = pointer moves to "Close window".
)
Return

ExitProgram:
ExitApp
Expand Down Expand Up @@ -123,9 +123,9 @@ Return
#If MouseIsOverTitlebar() ; apply the following hotkey only when the mouse is over title bars
RButton::WinMinimize
MButton::
if MouseIsOver("ahk_class Chrome_WidgetWin_1") or MouseIsOver("ahk_class MozillaWindowClass") ; if on Chrome and Firefox
if MouseIsOver("ahk_class Chrome_WidgetWin_1") or MouseIsOver("ahk_class MozillaWindowClass") ; exclude Chrome and Firefox
{
Return ; disable middle click to close windows
Return
}
else
{
Expand Down
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
Close It is a tiny Windows utility written in [AutoHotkey](https://autohotkey.com/). It helps you close windows faster or pin windows always on top.
Close It is a tiny Windows utility written in [AutoHotkey](https://autohotkey.com/). It helps you to close windows faster.
(Bonus: It also allows you to pin windows always on top.)

## Feature ##
- Middle click + title bar = close window.
![Close It Demo](img/Demo_MC_Close.gif)
![Close It Demo: Right click + taskbar button = pointer moves to "Close window".](img/Demo_RC_Pointer.gif)
![Close It Demo: Left click and hold + title bar = toggle window always on top.](img/Demo_LCH_Pin.gif)

- Right click + title bar = minize window.
![Close It Demo](img/Demo_RC_Minize.gif)

- Left click and hold + title bar = toggle window always on top.
![Close It Demo](img/Demo_LCH_Pin.gif)

- Double press + Esc key = close active window.
![Close It Demo](img/Demo_Esc_Close.gif)

- Right click + taskbar button = pointer moves to "Close window".
![Close It Demo](img/Demo_RC_Pointer.gif)
## All Features ##
- Middle click + title bar = close window.
- Right click + title bar = minize window.
- Left click and hold + title bar = toggle window always on top.
- Double press + Esc key = close active window.
- Right click + taskbar button = pointer moves to "Close window".

## Download ##
You can download the compiled standalone executable `Close It.exe` [here](https://github.com/chaohershi/Close-It/releases). No installation required.

Alternatively, you can download the source code and run the script `Close It.ahk` having AutoHotkey installed.

**Please be aware that if you choose to download and run the executable, you will get warnings from your web browser and Windows SmartScreen.** This is totally normal as the the file is not signed (purchasing trusted code signing certificate would cost a lot of $$$). Nevertheless, the file contains no virus and is 100% safe. Feel free to do a virus scan if you are still worried! Of which I recommend [VirusTotal](https://www.virustotal.com/).
**Please be aware that if you choose to download and run the executable, you may get popup window from Windows SmartScreen.** This is totally normal. It takes some time for Windows SmartScreen to recognize a new certificate like the one that Close It is using. Nevertheless, Close It is free and minimal and contains no malware of any kind. Feel free to do a virus scan if you are still worried! Or proceed by clicking on the "More info" link and then on the "Run anyway" button.
![Run Close It from Windows SmartScreen: Click on the "More info" link and then on the "Run anyway" button.](img/Run_Close_It_from_Windows_Smartscreen.gif)

## License ##
Close It is available under the MIT License.
Expand Down
Binary file added img/Run_Close_It_from_Windows_Smartscreen.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8983abc

Please sign in to comment.