Created
January 19, 2021 12:22
-
-
Save hrko/d7b58ded031a48de47297f9978e750a1 to your computer and use it in GitHub Desktop.
Minimize the Zoom meeting window to the taskbar when you clicked the minimize button, so that it does not become a mini-video.
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
#UseHook | |
; パフォーマンス向上 | |
#NoEnv | |
SetBatchLines -1 | |
ListLines Off | |
;マウス系関数で使う座標をスクリーンからの相対位置にする | |
CoordMode, Mouse, Screen | |
; 1,000 ms 以内に 200 回以上のホットキー入力があったらスクリプトを一時停止 | |
#HotkeyInterval 1000 | |
#MaxHotkeysPerInterval 200 | |
; ~RButton:: ; デバッグ時の座標取得用 | |
~LButton:: | |
MouseGetPos, CrsX, CrsY, WinId, , 1 | |
WinGetClass, WinClass, ahk_id %WinId% | |
if (WinClass == "ZPContentViewWndClass") { | |
; ウィンドウからのカーソルの相対座標を計算 | |
WinGetPos, WinX, WinY, WinWidth, , ahk_id %WinId% | |
X := CrsX - WinX | |
Y := CrsY - WinY | |
; デバッグ時の座標取得用 | |
; if (A_ThisHotkey == "~RButton") { | |
; OutputDebug, WinWidth: %WinWidth%, X: %X%, Y: %Y% | |
; Return | |
; } | |
; カーソルの位置が最小化ボタンの範囲内にないなら終了 | |
if (Y > 30 or Y < 1 or X > WinWidth - 101 or X < WinWidth - 147) { | |
Return | |
} | |
WinMinimize, ahk_id %WinId% | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment