What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » KILL AN APP

Pages: (3): « First « 1 2 [ 3 ] Last »
KILL AN APP
Author: Message:
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
36 / – / –
Joined: Dec 2005
RE: KILL AN APP
I found it pays to experiment, and do a google seach every once in a while. They were merely commenting on your seeming lack of knowledge to do with scripting.

The script posted there can shut down an app if you know the processes hWnd.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6670 days, 3 hours, 50 seconds ago
07-01-2006 02:13 AM
Profile E-Mail PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: KILL AN APP
so,  that function will work as it is in plus script...
now,   in the script documentation,  does it say whats the hWnd and how to know what app has wich hWnd?
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-01-2006 02:29 AM
Profile PM Web Find Quote Report
cloudhunter
Senior Member
****


Posts: 536
Reputation: 18
36 / – / –
Joined: Dec 2005
RE: KILL AN APP
Not meaning to get at you, but use your eyes for once. All the information is out there, find it.

Cloudy
[Image: cloudy.jpg]
Sig by pirateok/marisaok/marisa ;)
quote:
Originally posted by Moulin Rouge
The greatest thing you'll ever learn, is just to love and be loved in return

6670 days, 3 hours, 50 seconds ago
07-01-2006 02:55 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: RE: KILL AN APP
quote:
Originally posted by novolo
so,  that function will work as it is in plus script...
The example shown is not tested, but gives you an idea of what would be involved.

Also, the given VB example in that link posted by Matty (which I gave to him among other links) is a nice example but the code contains a few useless things and also lacks the part where you actually try to close the application in a not forcefull way as you should always do that first.

quote:
Originally posted by novolo
now,   in the script documentation,  does it say whats the hWnd and how to know what app has wich hWnd?
No, as that should be common programming knowledge. The Scripting Documentation is meant to give info on the Messenger Plus! objects and stuff, it isn't a general "how do I program" tutorial. A Window handle (hWnd) is unique for each window, an application can have many windows, or even no windows at all. And these window handles are not fixed numbers, they are assigned and removed on the fly and thus change each time.

To know the window handle for a given process name you need a bunch of other code. Note that different processes can have the same name, so you should loop them all. And also, note that a single process/application can contain many windows, and you will never know what window is the main window. So in fact you even need to get all window handles for a given module and process them all (in order to let the application close properly first, before forcing the process to close).

This post was edited on 07-02-2006 at 03:46 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
07-02-2006 03:37 AM
Profile PM Find Quote Report
novolo
Junior Member
**

Avatar
L2Luna GM

Posts: 67
– / Male / Flag
Joined: May 2006
O.P. RE: KILL AN APP
oh:( ,     then i think i can't do this..   i thought that the hWnd was always the same for an app,   for example,  my script opens the windows media player,  or performs a scan with norton antivirus,     so i thought that if i found out what's their hWnd,   i could always kill those apps...     
but now, as you say,  the hWnd is different every-time they run,  then is far more complicated than i thought
[Image: signature-user=247&back=4&clr=255,255,255&size=80.png][Image: novolo.gif]
07-02-2006 05:22 PM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: KILL AN APP
quote:
Originally posted by CookieRevised
The example shown is not tested, but gives you an idea of what would be involved.
Actually Cook it is :P
07-02-2006 06:55 PM
Profile E-Mail PM Find Quote Report
Pages: (3): « First « 1 2 [ 3 ] 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