Last active
August 14, 2019 04:19
-
-
Save q8f13/83585561735b01d83a491917313b5d9f to your computer and use it in GitHub Desktop.
close tab windows in unity; alt+f4 may cause misoperation to closing whole editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
setWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
SetTitleMatchMode RegEx | |
; close tab windows in unity; alt+f4 may cause misoperation-leading to closing whole editor | |
#IfWinActive ^$ | |
^W:: | |
WinGetPos, X, Y, Width, Height, A | |
MouseGetPos, xpos, ypos, | |
nposx := Width - 12 | |
; MsgBox, the active window is at %X%, %Y% with %Width%, %Height%, mouse at %xpos%, %ypos%, calc result is %nposx%,%ypos% | |
MouseClick, left, %nposx%, 8 | |
return | |
#IfWinActive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment