quote:
Originally posted by rix
Hey!
One local user here asked about possibility to show the name of the webpage opened in Mozilla in your personal message / nickname. As im not familiar with scripting nor API, i'm asking.. is it possible?
just findwindow and then get the window title and strip " - Mozilla Firefox" or whatever
code:
var WM_GETTEXT = 0xD
var hwnd = Interop.Call('User32',"FindWindowW", 'MozillaUIWindowClass', 0);
if(hwnd > 0){
var appTitle = Interop.Allocate((255 *2)+2);
if(Interop.Call('User32', 'SendMessageW', hwnd, WM_GETTEXT, 255, appTitle)){
var titleRaw = appTitle.ReadString(0);
var title = titleRaw.replace(" - Mozilla Firefox", "");
Debug.Trace(title);
}
}
other than that, you could probably create an extension to communicate with the plus script