feat: mute feishu meeting by win+m

This commit is contained in:
Klesh Wong 2021-08-11 11:05:21 +08:00
parent 44c0400f36
commit abb07a063e
2 changed files with 42 additions and 1 deletions

View File

@ -425,3 +425,12 @@ AdjustNewWindow() {
ArrangeActiveWindowFromStorage()
}
}
HideTrayTip() {
TrayTip ; Attempt to hide it the normal way.
if SubStr(A_OSVersion,1,3) = "10." {
Menu Tray, NoIcon
Sleep 200 ; It may be necessary to adjust this sleep.
Menu Tray, Icon
}
}

View File

@ -3,6 +3,7 @@
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode, Mouse, Screen ; mouse coordinates relative to the screen
CoordMode, Pixel, Screen ; mouse coordinates relative to the screen
; =========================
; DEBUGGING
@ -130,4 +131,35 @@ InitClipboardManager()
; Send {~}
; SetCapsLockState % !GetKeyState("CapsLock", "T")
; Return
; Capslock::return
; Capslock::return
; HELPER
; toggle mute for feishu meeting
#m::
WinGet, prevWinId, ID, A
MouseGetPos, ox, oy
WinGet, meetingWinId, ID, ahk_exe Feishu.exe, , |
if (meetingWinId) {
WinGetPos, x, y , w, h, ahk_id %meetingWinId%
WinActivate, ahk_id %meetingWinId%
mx := x + 20
my := y + h - 20
SetCursorPos(mx, my)
SetCursorPos(mx, my)
MouseClick
Sleep, 100
; mx := x + 38
; my := y + h - 36
; PixelGetColor, color, %mx%, %my%
; MsgBox, %mx% %my% %color%
WinActivate, ahk_id %prevWinId%
SetCursorPos(ox, oy)
; if (color = 0x5d5651) {
; TrayTip, note, feishu meeting unmuted
; Sleep 3000
; HideTrayTip()
; }
}
Return