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

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

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

        如何從 chrome 獲取打開的標簽列表?|C#

        How to get a list of open tabs from chrome? | C#(如何從 chrome 獲取打開的標簽列表?|C#)
        <legend id='k8N9z'><style id='k8N9z'><dir id='k8N9z'><q id='k8N9z'></q></dir></style></legend><tfoot id='k8N9z'></tfoot>
          • <bdo id='k8N9z'></bdo><ul id='k8N9z'></ul>

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

                  <tbody id='k8N9z'></tbody>

              • <i id='k8N9z'><tr id='k8N9z'><dt id='k8N9z'><q id='k8N9z'><span id='k8N9z'><b id='k8N9z'><form id='k8N9z'><ins id='k8N9z'></ins><ul id='k8N9z'></ul><sub id='k8N9z'></sub></form><legend id='k8N9z'></legend><bdo id='k8N9z'><pre id='k8N9z'><center id='k8N9z'></center></pre></bdo></b><th id='k8N9z'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='k8N9z'><tfoot id='k8N9z'></tfoot><dl id='k8N9z'><fieldset id='k8N9z'></fieldset></dl></div>
                • 本文介紹了如何從 chrome 獲取打開的標簽列表?|C#的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  所以我想從 google chrome 中提取打開的標簽(標題、URL)并列出主題,就像在 chrome 任務管理器中一樣.到目前為止,我已嘗試過濾所有 chrome 進程并獲取窗口標題,但這不起作用:

                  So I want to extract the open tabs from google chrome (title, URL) and list theme out kind of like in the chrome task manager. So far I have tried to filter all the chrome processes and get the window titles but that doesn't work:

                  var procs = Process.GetProcesses();
                  
                  ...
                  
                  foreach (var proc in procs)
                  {
                     if (Convert.ToString(proc.ProcessName) == "chrome")
                     {
                        Console.WriteLine("{0}: {1} | {2} | {3} ||| {4}
                  ", i, proc.ProcessName, runtime, proc.MainWindowTitle, proc.Handle);
                     }
                  }
                  

                  這并沒有給我標簽的地址或標題,還有其他方法嗎?

                  This doesn't give me the address or the title of the tab, is there another way to do it?

                  推薦答案

                  先引用兩個dll

                  UIAutomationClient.dll
                  UIAutomationTypes.dll
                  

                  位于:C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.0(或 3.5)

                  然后

                  using System.Windows.Automation;
                  

                  和代碼

                  Process[] procsChrome = Process.GetProcessesByName("chrome");
                  if (procsChrome.Length <= 0)
                  {
                     Console.WriteLine("Chrome is not running");
                  }
                  else
                  {
                     foreach (Process proc in procsChrome)
                     {
                        // the chrome process must have a window 
                        if (proc.MainWindowHandle == IntPtr.Zero)
                        {
                            continue;
                        }
                        // to find the tabs we first need to locate something reliable - the 'New Tab' button 
                        AutomationElement root = AutomationElement.FromHandle(proc.MainWindowHandle);
                        Condition condNewTab = new PropertyCondition(AutomationElement.NameProperty, "New Tab");
                        AutomationElement elmNewTab = root.FindFirst(TreeScope.Descendants, condNewTab);
                        // get the tabstrip by getting the parent of the 'new tab' button 
                        TreeWalker treewalker = TreeWalker.ControlViewWalker;
                        AutomationElement elmTabStrip = treewalker.GetParent(elmNewTab);
                        // loop through all the tabs and get the names which is the page title 
                        Condition condTabItem = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.TabItem);
                        foreach (AutomationElement tabitem in elmTabStrip.FindAll(TreeScope.Children, condTabItem))
                        {
                            Console.WriteLine(tabitem.Current.Name);
                        }
                     }
                  }
                  

                  這篇關于如何從 chrome 獲取打開的標簽列表?|C#的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  What are good algorithms for vehicle license plate detection?(車牌檢測有哪些好的算法?)
                  onClick event for Image in Unity(Unity中圖像的onClick事件)
                  Running Total C#(運行總 C#)
                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                    • <bdo id='vZboq'></bdo><ul id='vZboq'></ul>
                        <tbody id='vZboq'></tbody>

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

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

                            <tfoot id='vZboq'></tfoot>

                            主站蜘蛛池模板: 国产日韩精品一区二区 | 国产精品高潮呻吟久久av野狼 | 久久久成人一区二区免费影院 | 国产欧美一区二区三区免费 | 凹凸日日摸日日碰夜夜 | 欧美精品综合在线 | 欧美日韩中文在线 | 午夜电影福利 | 欧美精品久久 | 日本久久精品视频 | 美女爽到呻吟久久久久 | 国产网站久久 | 福利在线观看 | av一二三区| 亚洲激情在线观看 | 日韩五月天 | 国产成人精品视频在线观看 | 中文字幕综合 | 欧美一级淫片007 | 久久久观看 | 一区二区三区av夏目彩春 | 黄色永久免费 | 蜜桃精品视频在线 | 中文字幕人成乱码在线观看 | 亚洲免费精品 | 婷婷中文在线 | 精品免费国产一区二区三区 | 三级在线观看 | av黄在线观看 | 免费在线视频一区二区 | 伊人婷婷 | 少妇一级淫片免费播放 | 超碰成人免费观看 | 久久中文字幕视频 | 欧美一区不卡 | 久久在线 | 手机在线不卡av | 无码国模国产在线观看 | www.狠狠干| 青青草视频网 | 精品欧美乱码久久久久久 |