{"id":9085,"date":"2017-08-18T16:01:00","date_gmt":"2017-08-18T07:01:00","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=9085"},"modified":"2017-08-18T16:01:00","modified_gmt":"2017-08-18T07:01:00","slug":"%e3%80%902017%e5%b9%b48%e6%9c%88%e7%89%88%e3%80%91%e8%b5%b7%e5%8b%95%e4%b8%ad%e3%81%aemicrosoft-edge%e3%81%8b%e3%82%89%e3%82%bf%e3%82%a4%e3%83%88%e3%83%ab%e3%81%a8url%e3%82%92%e5%8f%96%e5%be%97","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=9085","title":{"rendered":"\u30102017\u5e748\u6708\u7248\u3011\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9"},"content":{"rendered":"<p>\u5f53\u30d6\u30ed\u30b0\u3067\u306f\u3001Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u3001\u3044\u304f\u3064\u304b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6145\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(UI Automation\u7de8)' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.08.18<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6145\">\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(UI Automation\u7de8) <\/a><\/div><div class=\"cardlink_excerpt\">2017\/8\/18 \u8ffd\u8a18\uff1a\r\n\u5f53\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306f\u73fe\u5728\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u304f\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\r\n\r\n\r\n\r\n\r\n\r\nMicrosoft Edge\u306eDeveloper Resources\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u201c\u30b5\u30dd\u30fc\u30c8\u304c\u5fc5\u8981\u306a\u3089Stack Overflow...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6148\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='\u7d9a\u30fb\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(UI Automation\u7de8)' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.08.20<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6148\">\u7d9a\u30fb\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(UI Automation\u7de8) <\/a><\/div><div class=\"cardlink_excerpt\">2017\/8\/18 \u8ffd\u8a18\uff1a\r\n\u5f53\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306f\u73fe\u5728\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u304f\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\r\n\r\n\r\n\r\n\r\n\r\n\u524d\u56de\u306e\u8a18\u4e8b\u3067\u3001UI Automation\u3092\u4f7f\u3063\u3066\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9\u3092\u7d39\u4ecb...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6283\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(DOM\u7de8)' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.10.07<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6283\">\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9(DOM\u7de8) <\/a><\/div><div class=\"cardlink_excerpt\">2017\/8\/18 \u8ffd\u8a18\uff1a\r\n\u5f53\u8a18\u4e8b\u306e\u30b3\u30fc\u30c9\u306f\u73fe\u5728\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u65b0\u3057\u304f\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u76f4\u3057\u307e\u3057\u305f\u3002\r\n\r\n\r\n\r\n\r\n\r\n\u3053\u308c\u307e\u3067\u5f53\u30d6\u30ed\u30b0\u3067\u306f\u3001C#\u3067Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u3044\u304f\u3064\u304b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u304d\u307e\u3057\u305f\u3002\r\n\r\n\r\n\r\nMi...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<p>\u3057\u304b\u3057\u3001\u73fe\u6642\u70b9(2018\u5e748\u6708)\u3067\u306fEdge\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u4f34\u3044\u3053\u308c\u3089\u306e\u8a18\u4e8b\u306b\u3042\u308b\u30b3\u30fc\u30c9\u304c<span style=\"color: #ff0000; font-weight: bold;\">\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u308b<\/span>\u305f\u3081\u3001\u4eca\u56de\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u76f4\u3059\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4 class=\"style4a\">\u30c6\u30b9\u30c8\u74b0\u5883<\/h4>\n<ol>\n<li>Microsoft Windows 10 Pro Insider Preview \u30d0\u30fc\u30b8\u30e7\u30f3:10.0.16257 \u30d3\u30eb\u30c9 16257 64\u30d3\u30c3\u30c8\u7248<\/li>\n<li>Microsoft.MicrosoftEdge 41.16257.1.0<\/li>\n<\/ol>\n<h4 class=\"style4a\">C#\u30b3\u30fc\u30c9<\/h4>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">using System;\r\nusing System.Text;\r\nusing System.Runtime.InteropServices;\r\n \r\nnamespace GetUrlAndTitleFromEdge\r\n{\r\n  class Program\r\n  {\r\n    &#x5B;Flags]\r\n    private enum SendMessageTimeoutFlags : uint\r\n    {\r\n      SMTO_NORMAL = 0x0000,\r\n      SMTO_BLOCK = 0x0001,\r\n      SMTO_ABORTIFHUNG = 0x0002,\r\n      SMTO_NOTIMEOUTIFNOTHUNG = 0x0008,\r\n      SMTO_ERRORONEXIT = 0x0020\r\n    }\r\n    private delegate bool Win32Callback(IntPtr hWnd, ref IntPtr lParam);\r\n     \r\n    &#x5B;DllImport(&quot;user32.dll&quot;)]\r\n    &#x5B;return: MarshalAs(UnmanagedType.Bool)]\r\n    private static extern bool EnumWindows(Win32Callback lpEnumFunc, ref IntPtr lParam);\r\n    &#x5B;DllImport(&quot;user32.dll&quot;, SetLastError = true)]\r\n    private static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow);\r\n    &#x5B;DllImport(&quot;user32.dll&quot;, CharSet = CharSet.Auto)]\r\n    private static extern int GetClassName(IntPtr hWnd, StringBuilder lpClassName, int nMaxCount);\r\n    &#x5B;DllImport(&quot;oleacc.dll&quot;, PreserveSig=false)]\r\n    &#x5B;return: MarshalAs(UnmanagedType.Interface)]\r\n    private static extern object ObjectFromLresult(UIntPtr lResult, &#x5B;MarshalAs(UnmanagedType.LPStruct)] Guid refiid, IntPtr wParam);\r\n    &#x5B;DllImport(&quot;user32.dll&quot;, SetLastError=true, CharSet=CharSet.Auto)]\r\n    private static extern uint RegisterWindowMessage(string lpString);\r\n    &#x5B;DllImport(&quot;user32.dll&quot;, SetLastError=true, CharSet=CharSet.Auto)]\r\n    private static extern IntPtr SendMessageTimeout(IntPtr windowHandle, uint Msg, IntPtr wParam, IntPtr lParam, SendMessageTimeoutFlags flags, uint timeout, out UIntPtr result);\r\n    \r\n    public static void Main(string&#x5B;] args)\r\n    {\r\n      IntPtr hWin = IntPtr.Zero;\r\n      Win32Callback proc = new Win32Callback(EnumWindowsProc);\r\n      EnumWindows(proc, ref hWin);\r\n      Console.Write(&quot;Press any key to continue . . . &quot;);\r\n      Console.ReadKey(true);\r\n    }\r\n    \r\n    private static bool EnumWindowsProc(IntPtr hWnd, ref IntPtr lParam)\r\n    {\r\n      IntPtr hChild = IntPtr.Zero;\r\n      StringBuilder buf = new StringBuilder(1024);\r\n      GetClassName(hWnd, buf, buf.Capacity);\r\n      if (buf.ToString() == &quot;TabWindowClass&quot;) {\r\n        \/\/get 'Internet Explorer_Server' window\r\n        hChild = FindWindowEx(hWnd, IntPtr.Zero, &quot;Internet Explorer_Server&quot;, &quot;&quot;);\r\n        if (hChild != IntPtr.Zero) {\r\n          dynamic doc = null;\r\n          doc = GetHTMLDocumentFromWindow(hChild);\r\n          if (doc != null) {\r\n            Console.WriteLine(doc.Title + &quot;, &quot; + doc.url); \/\/get document title &amp; url\r\n          }\r\n        }\r\n      }\r\n      return true;\r\n    }\r\n     \r\n    \/\/get HTMLDocument object\r\n    private static object GetHTMLDocumentFromWindow(IntPtr hWnd)\r\n    {\r\n      UIntPtr lRes;\r\n      object doc = null;\r\n      Guid IID_IHTMLDocument2 = new Guid(&quot;332C4425-26CB-11D0-B483-00C04FD90119&quot;);\r\n      uint nMsg = RegisterWindowMessage(&quot;WM_HTML_GETOBJECT&quot;);\r\n      if (nMsg != 0) {\r\n        SendMessageTimeout(hWnd, nMsg, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_ABORTIFHUNG, 1000, out lRes);\r\n        if (lRes != UIntPtr.Zero) {\r\n          doc = ObjectFromLresult(lRes, IID_IHTMLDocument2, IntPtr.Zero);\r\n        }\r\n      }\r\n      return doc;\r\n    }\r\n  }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GetUrlAndTitleFromEdge_01.gif\" alt=\"\" width=\"639\" height=\"498\" class=\"alignnone size-full wp-image-9086\" \/><\/p>\n<p>\u4ed5\u7d44\u307f\u306f\u4e0b\u8a18\u8a18\u4e8b\u306eVBA\u30de\u30af\u30ed\u3068\u540c\u3058\u3067\u3001TabWindowClass\u30af\u30e9\u30b9\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u6c7a\u3081\u6253\u3061\u3057\u3066\u3001\u305d\u306e\u4e0b\u306b\u3042\u308bInternet Explorer_Server\u30af\u30e9\u30b9\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304b\u3089HTMLDocument\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7921\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge-120x120.png' alt='\u30102017\u5e741\u6708\u7248\u3011Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2017.01.31<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7921\">\u30102017\u5e741\u6708\u7248\u3011Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8) <\/a><\/div><div class=\"cardlink_excerpt\">2021\/10\/1 \u8ffd\u8a18\uff1a\r\n\u672c\u8a18\u4e8b\u306f\u516c\u958b\u3055\u308c\u3066\u304b\u3089\u5927\u5206\u6642\u9593\u304c\u7d4c\u3063\u3066\u304a\u308a\u5185\u5bb9\u3082\u53e4\u304f\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002\r\nVBA\u304b\u3089\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u64cd\u4f5c\u306b\u3064\u304d\u307e\u3057\u3066\u306f\u4e0b\u8a18\u8a18\u4e8b\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\u300cMicrosoft Edge VBA \u64cd\u4f5c\u300d\u3053\u3046\u3044...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<p>\u4e0a\u8a18\u8a18\u4e8b\u3067\u3082\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306e\u65b9\u6cd5\u306fMicrosoft\u304c\u63a8\u5968\u3057\u3066\u3044\u308b\u65b9\u6cd5\u3067\u306f\u7121\u304f\u3001\u3044\u3064\u4f7f\u3048\u306a\u304f\u306a\u308b\u304b\u3082\u5206\u304b\u3089\u306a\u3044\u305f\u3081\u3001\u53ef\u80fd\u3067\u3042\u308c\u3070\u6b63\u5f0f\u306b\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u300c<a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/tools\/webdriver\/\" title=\"WebDriver - Microsoft Edge Development\" target=\"_blank\">WebDriver<\/a>\u300d\u3092\u4f7f\u3046\u3053\u3068\u3092\u304a\u85a6\u3081\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f53\u30d6\u30ed\u30b0\u3067\u306f\u3001Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30fc\u30c9\u306b\u3064\u3044\u3066\u3001\u3044\u304f\u3064\u304b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u304d\u307e\u3057\u305f\u3002 \u3057\u304b\u3057\u3001\u73fe\u6642\u70b9(2018\u5e748\u6708)\u3067\u306fEdge\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u306b\u4f34\u3044\u3053\u308c\u3089\u306e\u8a18\u4e8b\u306b\u3042\u308b\u30b3\u30fc\u30c9\u304c\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u4eca\u56de [&hellip;]","protected":false},"author":1,"featured_media":7115,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[\u30102017\u5e748\u6708\u7248\u3011\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bC#\u30b3\u30fc\u30c9]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[132,25,133],"tags":[],"class_list":["post-9085","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows10","category-windows","category-microsoft-edge"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-MicrosoftEdge.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-2mx","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9085"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9085\/revisions"}],"predecessor-version":[{"id":9087,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9085\/revisions\/9087"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7115"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}