This script automates certain tasks in Microsoft Teams to improve efficiency. There are two scripts included:
- Setup Meeting Automation – This script helps automate the process of sharing the screen and starting the recording of a Teams meeting without manually clicking multiple times. Users only need to create or join a meeting, and the script will handle the rest.
- Teams Break Automation – This script simulates a break system in Teams. When executed, it stops the recording and screen share. After the set break duration (default is 15 seconds), the script will automatically open the meeting window, start the recording, and re-enable screen sharing. This script uses
cliclickto click on the recording button automatically. Detailed setup instructions are provided below.
Note: These scripts have been tested on macOS Sequoia.
cliclick (short for "command-line interface click") is an open-source and free-to-use tool that allows you to simulate mouse clicks and keystrokes on macOS.
- GitHub Link: https://github.com/BlueM/cliclick
The easiest way to install cliclick is via Homebrew:
brew install cliclickTo find the installation path, run:
which cliclickThis will output the full path, which you will need to update in the script.
If you want to use these scripts with macOS Shortcuts, you need to grant accessibility permissions:
- Open System Settings > Security & Privacy > Accessibility.
- Enable the checkbox for Automator and Microsoft Teams.
- After downloading the script files, move them to
~/Library/Services/. - Open System Settings > Keyboard > Keyboard Shortcuts > Services.
- Find General and under General locate both script names.
- Double-click where "None" is written and assign your desired shortcut.
To make this script work for your specific Teams setup, you need to update the click coordinates and cliclick path.
- Open the script by double-clicking or by opening Automator, selecting Quick Action, then File > Open.
- Modify the
cliclickpath:- To find these lines easily, click the hammer icon in Automator before making changes. This will format the script properly.
- Locate this line in the
Setup Meeting Automationscript:do shell script "/opt/homebrew/bin/cliclick c:1080,70"
- Replace
/opt/homebrew/bin/cliclickwith the actual path fromwhich cliclick. - Replace
1080,70with the actual coordinates of the "More" button in Teams.
- Using macOS Screenshot Tool:
- Open Teams and start a meeting in fullscreen.
- Press Cmd + Shift + 4.
- Move the crosshair over the More button (three dots) and note the coordinates.
- Using Xcode Accessibility Inspector:
- Open Xcode, use the Accessibility Inspector, target the More button, and note the coordinates.
- You need to replace this line in two places:
do shell script "<your cliclick path> c:<your screen button coordinates>"
To change the break time, modify this line:
delay 15 -- Wait for the specified time duration- Time is measured in seconds. For example, to set a 10-minute break, replace
15with600.
- Ensure that only one Teams meeting window is open at a time for optimal script execution.
- After joining the meeting, close any extra Teams windows before running the script.
- When using the Break Automation Script, you can use your Mac normally during the break. The script will automatically switch back to the meeting when the time is over.
- Do not interfere with the script when it switches back to Teams.
If you see a warning such as:
"Apple could not verify 'cliclick' is free of malware."
Follow these steps:
- Go to System Preferences > Security & Privacy > Privacy.
- Scroll down and find the option to Allow Anyway.
- Run the script again. If it warns you again, a "Run Anyway" button will appear.
- Click Run Anyway, enter your admin password, and it should work now.
Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
- Bug Reports: If you find any bugs, please file an issue with a clear description and, if possible, steps to reproduce the problem.
- Feature Requests: If you have an idea for improvement, let us know!
- Pull Requests: Before submitting, ensure your code is well-documented and tested.
This project is licensed under the MIT License. You are free to modify and distribute it as per the terms of the license.
If you find this project useful, consider giving it a ⭐ on GitHub! Your support helps improve and maintain this project.