Skip to content

Commit

Permalink
Small improvement Outlook_TeamsMeetingJoin
Browse files Browse the repository at this point in the history
  • Loading branch information
Thierry Dalon committed Nov 14, 2023
1 parent 49175ac commit 543352b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions Lib/Outlook.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,7 @@ return oPA.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x5D01001E")
; ------------------------------------------------------------------




Outlook_JoinTeamsMeeting(oItem:="",autoJoin := false, openChat := false) {
Outlook_JoinTeamsMeeting(oItem:="",autoJoin := false, openChat := false) { @fun_outlook_jointeamsmeeting@
; Outlook_JoinTeamsMeeting(oItem:="",autoJoin := false, openChat := false)
; If oItem is empty, call Outlook_GetTeamsMeeting: user will be prompted to select Today's Teams meeting to join (Meetings are extracted from Outlook main calendar)
If (oItem == "")
Expand All @@ -300,12 +298,13 @@ If (sMeetingLink = "")
return
sMeetingLink := sMeetingLink1
; Use microsoft edge because better integrated. Teams Links can be whitelisted (Application Links) to be always opened in Teams Client
Run, microsoft-edge:%sMeetingLink%
Run, msedge.exe "%sMeetingLink%" " --new-window"
WinWaitActive, Join conversation ahk_exe msedge.exe

Title := oItem.Subject
WinWaitActive, %Title% ahk_exe Teams.exe,,2 ; Title can be misleading if meetings are copied/pasted->Timeout 2s in this case to be sure to catch the Join window and not the main Window
JoinWinId := WinExist("ahk_exe Teams.exe")
TeamsExe := Teams_GetExeName()
WinWaitActive, %Title% ahk_exe %TeamsExe%,,2 ; Title can be misleading if meetings are copied/pasted->Timeout 2s in this case to be sure to catch the Join window and not the main Window
JoinWinId := WinExist("ahk_exe " . TeamsExe)
; WinGetTitle, JoinWinTitle , ahk_id %JoinWinId%

; Close remaining browser window
Expand Down Expand Up @@ -339,8 +338,7 @@ If (autoJoin) {

; Unmute
TeamsEl.FindFirstByNameAndType("Unmute", "button",,2).Click

WinMaximize, ahk_exe Teams.exe
WinMaximize, ahk_exe %TeamsExe%

}

Expand All @@ -351,7 +349,7 @@ If (openChat)
} ; eofun



;-------------------------------------------------------------------------
Outlook_GetTeamsMeeting() {
; oItem := Outlook_GetTeamsMeeting()
; Get Teams Meeting Appointment Item from today meetings in Outlook main calendar
Expand Down Expand Up @@ -455,4 +453,5 @@ oItem := appts[ApptId1]

return oItem

} ; eofun
} ; eofun
;-------------------------------------------------------------------------
2 changes: 1 addition & 1 deletion docs/_pages/Teamsy.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ It is recommended to also download the PowerTools.ini file.

Keyword: 's2t'

### Meeting Leave ###
### [Meeting Leave](https://tdalon.blogspot.com/2023/11/teamsy-meeting-leave.html)

<div style="text-align:center"><img src="/ahk/assets/images/Teamsy_Meeting_Leave.gif" alt="Teamsy Meeting Leave"></div>

Expand Down

0 comments on commit 543352b

Please sign in to comment.