List browser tabs from an external application

A bit strange (complicated?) Question. Is it possible to programmatically access open browser tabs from an external application? I understand that a vague question, but listen to me:

What I'm trying to create is the Gmail Chat Notification application, which flashes the notification icon in the Windows system tray when an unanswered message exists. Right now, as far as I can tell, the only built-in notifications in Gmail chat are:

  • Turn on sounds (which I don't like)
  • Look at the window / tab / page title for the alternating blinking message "Gmail" / "Blah says ...".

Problem No. 2: When the browser window is minimized, and when the Gmail tab is not active in the browser, the window title does not change, t notifies you of new chat messages.

So, I would like to create an application that will keep track of table names for me. (All tab headers, not just the window title, which is only the active tab title.) I created a C # application with a proof of concept to detect unanswered chat messages by listing the active Windows processes and looking at the blinking “Blah says ...” in the window title :

Process[] procs = Process.GetProcesses();
IntPtr hWnd;
foreach (Process proc in procs)
    if ((hWnd = proc.MainWindowHandle) != IntPtr.Zero)
        if (proc.MainWindowTitle.IndexOf(" says… ") >= 0)
        ...

, , Gmail / ( ). -, .

. , , , - (MDI ? * *), , , :) , , , Firefox - ( Windows, ).

- ? .

+3
1

. MDI ( ). , ( , , , , ). , , Win32 , (, Qt WPF , Opera, , , , , Safari).

. , IE Firefox ( Firefox , , IPC). Opera, Safari Chrome.

+1

Source: https://habr.com/ru/post/1712351/


All Articles