Раньше существовал способ получить активный URL-адрес вкладки из Google Chrome с помощью FindWindowEx
в сочетании с вызовом SendMessage
, чтобы получить текст в настоящее время в omnibox. Недавнее (?) Обновление, похоже, нарушило этот метод, поскольку Chrome, похоже, теперь все делает сам. (Вы можете проверить со Spy ++, AHK Window Spy или Window Detective)
Чтобы получить текущий URL-адрес в Firefox и Opera, вы можете использовать DDE и WWW_GetWindowInfo
. Это не похоже на Chrome (больше?).
var hAddressBox = FindWindowEx(
intPtr,
IntPtr.Zero,
"Chrome_OmniboxView",
IntPtr.Zero);
var sb = new StringBuilder(256);
SendMessage(hAddressBox, 0x000D, (IntPtr)256, sb);
temp = sb.ToString();
Итак, мой вопрос: есть ли новый способ получить текущий URL-адрес вкладки? (Просто название недостаточно)