What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Titlebar of App -> PSM

Pages: (2): « First [ 1 ] 2 » Last »
[Request] Titlebar of App -> PSM
Author: Message:
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
O.P. [Request] Titlebar of App -> PSM
[Image: attachment.php?pid=939845]

Request: Specify an application. If it's open, use it's Titlebar and change your PSM to it.

PS: if you're nice you could include a /command that'll paste it in a convo (instead of displaying in PSM (a))

.jpg File Attachment: Capture.JPG (22.27 KB)
This file has been downloaded 460 time(s).

This post was edited on 12-06-2008 at 06:35 PM by prashker.
12-06-2008 06:19 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Titlebar of App -> PSM
But what if it is a porn website you are viewing. You want the entire world to know about your midget porn fetish?
12-06-2008 08:25 PM
Profile E-Mail PM Find Quote Report
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
O.P. RE: [Request] Titlebar of App -> PSM
quote:
Originally posted by matty
But what if it is a porn website you are viewing. You want the entire world to know about your midget porn fetish?

FireFox was an example :p...if I didn't want the world to know about my midget porn I wouldn't be requesting this :p
12-06-2008 10:44 PM
Profile PM Find Quote Report
TheSteve
Full Member
***

Avatar
The Man from Japan

Posts: 179
Reputation: 23
40 / Male / Flag
Joined: Aug 2005
RE: [Request] Titlebar of App -> PSM
From where I see it, there are three ways to implement something like this:

1. Set a timer (user customizable perhaps).  When the timer fires, call FindWindow to find the first browser for your desired browser.  Call GetWindowText/GetWindowTextLength to get the text of the window.  Set it to your PSM.
This method in theory, would be compatible with most browsers.
Browser Class List:
FireFox: MozillaUIWindowClass - The title should have "Mozilla FireFox" at the end. (Thunderbird uses this class too)
IE: IEFrame
Google Chrome: Chrome_XPFrame

2. For IE only, you could use the Registered message "WM_HTML_GETOBJECT" to get the browser control interfaces. I believe you can subscribe to events for this.

3. Write a plug-in for the desired browser. Then create an invisible window that will listen for messages from the browser plug-in  (Similar to how the "What I'm listening to" feature works)
12-07-2008 01:07 AM
Profile PM Web Find Quote Report
-dt-
Scripting Contest Winner
*****

Avatar
;o

Posts: 1819
Reputation: 74
35 / Male / Flag
Joined: Mar 2004
RE: [Request] Titlebar of App -> PSM
quote:
Originally posted by matty
But what if it is a porn website you are viewing. You want the entire world to know about your midget porn fetish?
we already know about his anime fetish ;p
[Image: dt2.0v2.png]      Happy Birthday, WDZ
12-07-2008 03:48 AM
Profile PM Web Find Quote Report
prashker
Veteran Member
*****


Posts: 5109
Reputation: 104
– / Male / –
Joined: Mar 2005
Status: Away
O.P. RE: [Request] Titlebar of App -> PSM
quote:
Originally posted by TheSteve
From where I see it, there are three ways to implement something like this:
I mean for any application, FireFox was just an example. If I wanted it to show msnmsgr.exe's titlebar then it'd make my PSM "Windows Live Messenger Beta" :P!
12-07-2008 03:56 AM
Profile PM Find Quote Report
TheSteve
Full Member
***

Avatar
The Man from Japan

Posts: 179
Reputation: 23
40 / Male / Flag
Joined: Aug 2005
RE: RE: [Request] Titlebar of App -> PSM
quote:
Originally posted by SonicSam
I mean for any application, FireFox was just an example.
In that case, it's a just a matter of getting the window handle to your desired window by calling FindWindow, then call GetWindowText to get the actual text.
12-07-2008 04:06 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Titlebar of App -> PSM
code:
function OnEvent_SigninReady(sEmail) {
    MsgPlus.AddTimer('x', 100);
}

function OnEvent_Timer(sTimerId) {
    var wintitlelength = Interop.Call('user32', 'GetWindowTextLengthW', Interop.Call('user32', 'GetForegroundWindow'));
   
    var wintitle = Interop.Allocate(wintitlelength);
    Interop.Call('user32', 'GetWindowText', Interop.Call('user32', 'GetForegroundWindow'), wintitle, wintitlelength);
   
    if (Messenger.MyPersonalMessage !== wintitlelength.ReadString(0, false)) Messenger.MyPersonalMessage = wintitlelength.ReadString(0, false);
   
    MsgPlus.AddTimer('x', 100);
}

Something like that.
12-14-2008 11:22 PM
Profile E-Mail PM Find Quote Report
DeanoLaad
New Member
*


Posts: 2
Joined: Dec 2008
RE: [Request] Titlebar of App -> PSM
code:
function test()
{
    //were iGoogle is Chrome(bowser)'s homepage.
    var wintitlelength = Interop.Call('user32', 'GetWindowTextLengthW', Interop.Call('user32', 'FindWindowW', 'iGoogle -', ''));
    var wintitle = Interop.Allocate(wintitlelength);
    Interop.Call('user32', 'GetWindowTextW', Interop.Call('user32', 'FindWindowW', 'iGoogle -', ''), wintitle, wintitlelength);
    output = wintitlelength.ReadString(0, false);
    return output;
}
Debug.Trace(test());

Were am i going wrong?..

This post was edited on 12-22-2008 at 09:41 PM by DeanoLaad.



12-15-2008 01:39 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Titlebar of App -> PSM
FindWindowW's first parameter is the Window Class the second parameter is apart of the title so change 'iGoogle -' to be the second param.
12-15-2008 01:54 AM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On