Shoutbox

API and Mozilla - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: API and Mozilla (/showthread.php?tid=78037)

API and Mozilla by rix on 10-07-2007 at 02:49 PM

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?


RE: API and Mozilla by Shiny Rabbit on 10-07-2007 at 03:01 PM

i don't think it is


RE: API and Mozilla by -dt- on 10-07-2007 at 03:14 PM

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 :P

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
RE: API and Mozilla by felipEx on 10-08-2007 at 02:01 AM

do you know if is there a way to use Dynamic Data Exchange(DDE) from Plus! Scripting?

;)