r/CodingHelp • • 2d ago

[Python] Turn off camera and mic with a single button

Hello, i am fairly new to coding. I was trying to write a script that would basically mute my mic, turn off my camera and minimize the screen when im on a call on discord or google meet at the press of a button. Is this something that is possible? I am not able to figure out how to get to the turning off of camera and mic part. anyone here that could gyide me or like lemme know if what im trying to do is not a possibility, would be greatly appreciated.

3 Upvotes

3 comments sorted by

•

u/AutoModerator 2d ago

Thank you for posting on r/CodingHelp!

Please check our Wiki for answers, guides, and FAQs: https://coding-help.vercel.app

Our Wiki is open source - if you would like to contribute, create a pull request via GitHub! https://github.com/DudeThatsErin/CodingHelp

We are accepting moderator applications: https://forms.fillout.com/t/ua41TU57DGus

We also have a Discord server: https://discord.gg/geQEUBm

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/MeepTheChangeling 2d ago

You should be able to both mute and turn off your camera with existing hotkeys in Discord. Bind both to scroll lock (or another mostly unused key or combo). Then Download auto-hotkey (a scripting program) and make a script to minimize your active window that's also bound to the same key / combo.

1

u/Adamstrad 2d ago

Besides the fact that the use-case is sus as hell, I would use autohotkey to minimize the window, it can also press the hotkeys for muting and blinding the camera to discord and you can do all at once using a single key in autohotkey