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

[Request] Titlebar of App -> PSM
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Titlebar of App -> PSM
What you need to do is have a config window that shows all the running processes and you can select which you want to show the title of.

This can be done by using EnumProcesses and GetModuleFileNameExW

Javascript code:
var aProcesses = Interop.Allocate(1024);
var bytesReturned = Interop.Allocate(4);
var szPidName = Interop.Allocate(512);
var hProcess;
 
Interop.Call('psapi', 'EnumProcesses', aProcesses, aProcesses.Size, bytesReturned);
 
for (var i=0; i<=bytesReturned.ReadDWORD(0)/4; i++) {
    hProcess = Interop.Call('kernel32', 'OpenProcess', 0x400 /* PROCESS_QUERY_INFORMATION */ | 0x10 /* PROCESS_VM_READ */, 0, aProcess.ReadDWORD(i*4));
    Interop.Call('psapi', 'GetModuleFileNameExW', hProcess, szPidName, 200, 500);
    Debug.Trace(aProcess.ReadDWORD(i*4)+' : '+szPidName.ReadString(0));
}
 
aProcesses.Size = 0;
bytesReturned.Size = 0;
szPidName.Size = 0;


Untested code as I am at work.

This post was edited on 12-22-2008 at 05:59 PM by matty.
12-22-2008 05:41 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Titlebar of App -> PSM - by prashker on 12-06-2008 at 06:19 PM
RE: [Request] Titlebar of App -> PSM - by matty on 12-06-2008 at 08:25 PM
RE: [Request] Titlebar of App -> PSM - by prashker on 12-06-2008 at 10:44 PM
RE: [Request] Titlebar of App -> PSM - by TheSteve on 12-07-2008 at 01:07 AM
RE: [Request] Titlebar of App -> PSM - by -dt- on 12-07-2008 at 03:48 AM
RE: [Request] Titlebar of App -> PSM - by prashker on 12-07-2008 at 03:56 AM
RE: RE: [Request] Titlebar of App -> PSM - by TheSteve on 12-07-2008 at 04:06 AM
RE: [Request] Titlebar of App -> PSM - by matty on 12-14-2008 at 11:22 PM
RE: [Request] Titlebar of App -> PSM - by DeanoLaad on 12-15-2008 at 01:39 AM
RE: [Request] Titlebar of App -> PSM - by matty on 12-15-2008 at 01:54 AM
RE: [Request] Titlebar of App -> PSM - by Spunky on 12-22-2008 at 03:29 AM
RE: [Request] Titlebar of App -> PSM - by Felu on 12-22-2008 at 03:44 AM
RE: [Request] Titlebar of App -> PSM - by prashker on 12-22-2008 at 05:08 AM
RE: [Request] Titlebar of App -> PSM - by Pinecone on 12-22-2008 at 07:24 AM
RE: [Request] Titlebar of App -> PSM - by prashker on 12-22-2008 at 04:33 PM
RE: [Request] Titlebar of App -> PSM - by matty on 12-22-2008 at 05:41 PM
RE: [Request] Titlebar of App -> PSM - by MicroWay on 12-22-2008 at 10:34 PM


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