久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <tfoot id='Rd3mX'></tfoot>

        <small id='Rd3mX'></small><noframes id='Rd3mX'>

        <i id='Rd3mX'><tr id='Rd3mX'><dt id='Rd3mX'><q id='Rd3mX'><span id='Rd3mX'><b id='Rd3mX'><form id='Rd3mX'><ins id='Rd3mX'></ins><ul id='Rd3mX'></ul><sub id='Rd3mX'></sub></form><legend id='Rd3mX'></legend><bdo id='Rd3mX'><pre id='Rd3mX'><center id='Rd3mX'></center></pre></bdo></b><th id='Rd3mX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Rd3mX'><tfoot id='Rd3mX'></tfoot><dl id='Rd3mX'><fieldset id='Rd3mX'></fieldset></dl></div>

      1. <legend id='Rd3mX'><style id='Rd3mX'><dir id='Rd3mX'><q id='Rd3mX'></q></dir></style></legend>
        • <bdo id='Rd3mX'></bdo><ul id='Rd3mX'></ul>

        如何使用 python 在 Windows 10 中獲取當(dāng)前正在播放的

        How can I get the title of the currently playing media in windows 10 with python(如何使用 python 在 Windows 10 中獲取當(dāng)前正在播放的媒體的標(biāo)題)
      2. <legend id='ZYtq0'><style id='ZYtq0'><dir id='ZYtq0'><q id='ZYtq0'></q></dir></style></legend>

          <tfoot id='ZYtq0'></tfoot>
            <bdo id='ZYtq0'></bdo><ul id='ZYtq0'></ul>

                <small id='ZYtq0'></small><noframes id='ZYtq0'>

                1. <i id='ZYtq0'><tr id='ZYtq0'><dt id='ZYtq0'><q id='ZYtq0'><span id='ZYtq0'><b id='ZYtq0'><form id='ZYtq0'><ins id='ZYtq0'></ins><ul id='ZYtq0'></ul><sub id='ZYtq0'></sub></form><legend id='ZYtq0'></legend><bdo id='ZYtq0'><pre id='ZYtq0'><center id='ZYtq0'></center></pre></bdo></b><th id='ZYtq0'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='ZYtq0'><tfoot id='ZYtq0'></tfoot><dl id='ZYtq0'><fieldset id='ZYtq0'></fieldset></dl></div>
                    <tbody id='ZYtq0'></tbody>
                  本文介紹了如何使用 python 在 Windows 10 中獲取當(dāng)前正在播放的媒體的標(biāo)題的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  無論何時(shí)在 Windows 10 中播放音頻,無論是來自 Spotify、Firefox 還是游戲.當(dāng)你打開音量時(shí),windows 的角落里會(huì)顯示歌曲藝術(shù)家、標(biāo)題以及正在播放的應(yīng)用程序,如下圖所示(有時(shí)它只顯示游戲正在播放聲音時(shí)哪個(gè)應(yīng)用程序正在播放聲音)

                  Whenever audio is playing in windows 10, whether it is from Spotify, Firefox, or a game. When you turn the volume, windows has a thing in the corner that says the song artist, title, and what app is playing like the photo below (sometimes it only says what app is playing sound if a game is playing the sound)

                  我想以某種方式使用 python 獲取這些數(shù)據(jù).我的最終目標(biāo)是,如果應(yīng)用程序正在播放我不喜歡的內(nèi)容(例如廣告),則將其靜音.

                  I want to somehow get that data with python. My end goal, is to mute an application if it is playing something I don't like, such as an advertisement.

                  推薦答案

                  我正在獲取windows的標(biāo)題來獲取歌曲信息.通常,應(yīng)用程序名稱顯示在標(biāo)題中,但在播放歌曲時(shí),會(huì)顯示歌曲名稱.這是一個(gè)返回所有窗口標(biāo)題列表的函數(shù).

                  I am getting the titles of the windows to get the song information. Usually, the application name is displayed in the title, but when it is playing a song, the song name is shown. Here is a function that returns a list of all the window titles.

                  from __future__ import print_function
                  import ctypes
                  def get_titles(): 
                      EnumWindows = ctypes.windll.user32.EnumWindows
                      EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.c_bool, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int))
                      GetWindowText = ctypes.windll.user32.GetWindowTextW
                      GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
                      IsWindowVisible = ctypes.windll.user32.IsWindowVisible
                      
                      titles = []
                      def foreach_window(hwnd, lParam):
                          if IsWindowVisible(hwnd):
                              length = GetWindowTextLength(hwnd)
                              buff = ctypes.create_unicode_buffer(length + 1)
                              GetWindowText(hwnd, buff, length + 1)
                              titles.append(buff.value)
                          return True
                      EnumWindows(EnumWindowsProc(foreach_window), 0)
                      return titles
                  

                  這篇關(guān)于如何使用 python 在 Windows 10 中獲取當(dāng)前正在播放的媒體的標(biāo)題的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)

                2. <legend id='rSd4Z'><style id='rSd4Z'><dir id='rSd4Z'><q id='rSd4Z'></q></dir></style></legend>
                  • <i id='rSd4Z'><tr id='rSd4Z'><dt id='rSd4Z'><q id='rSd4Z'><span id='rSd4Z'><b id='rSd4Z'><form id='rSd4Z'><ins id='rSd4Z'></ins><ul id='rSd4Z'></ul><sub id='rSd4Z'></sub></form><legend id='rSd4Z'></legend><bdo id='rSd4Z'><pre id='rSd4Z'><center id='rSd4Z'></center></pre></bdo></b><th id='rSd4Z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='rSd4Z'><tfoot id='rSd4Z'></tfoot><dl id='rSd4Z'><fieldset id='rSd4Z'></fieldset></dl></div>
                      • <bdo id='rSd4Z'></bdo><ul id='rSd4Z'></ul>

                        <tfoot id='rSd4Z'></tfoot>

                          <tbody id='rSd4Z'></tbody>
                      • <small id='rSd4Z'></small><noframes id='rSd4Z'>

                            主站蜘蛛池模板: 久久综合久久综合久久综合 | 成人高清视频在线观看 | 国产精品有限公司 | 亚洲一区二区视频 | 成人精品鲁一区一区二区 | 玖玖视频网 | 人人操日日干 | 动漫www.被爆羞羞av44 | 超碰在线久 | 草久久久| 欧美日韩久久久 | 欧美成年人视频在线观看 | 亚洲欧洲综合av | 欧美xxxx性| 99精品久久久久久中文字幕 | 欧美在线一区二区三区四区 | 久久免费精品 | 中午字幕在线观看 | 亚洲福利一区 | 精品一二区 | 国产丝袜av | 久久新视频 | 国产在线精品一区二区 | 黄色毛片在线观看 | 一区二区精品 | 黄色网址在线免费观看 | 欧美一区二区三区久久精品 | 国产一区91精品张津瑜 | 黄色日本片 | 影音先锋成人资源 | 97人人澡人人爽91综合色 | 欧美日韩中文国产一区发布 | 国产精品观看 | 成人无遮挡毛片免费看 | 天天操人人干 | 亚洲国产精品va在线看黑人 | 欧美一级做性受免费大片免费 | 午夜播放器在线观看 | 国产1区在线 | 一级a性色生活片久久毛片波多野 | 欧美精品综合 |