What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » get the handle of a toast?

get the handle of a toast?
Author: Message:
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. get the handle of a toast?
is it possible to get the handle of a toast so that i can kill it from a script?
[Image: gybouserbar6hc.gif]
08-08-2006 06:47 PM
Profile PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
36 / Male / Flag
Joined: Jul 2006
RE: get the handle of a toast?
Why do you want to kill it?
MP!L has a lot of options for toast, you could turn toasts off for some events...
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
08-08-2006 08:26 PM
Profile PM Find Quote Report
deAd
Scripting Contest Winner
*****

Avatar

Posts: 1060
Reputation: 28
– / Male / Flag
Joined: Jan 2006
RE: get the handle of a toast?
Use FindWindow (look it up on MSDN). Set class name to 0 and the title to whatever text is inside the toast. Or, you can just turn off toasts in the registry because by killing it there will be a flash ;)
08-08-2006 10:19 PM
Profile PM Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: get the handle of a toast?
the way i used to do it in a old old old program

subclass messenger (tutorial in vb: http://forum.mess.be/index.php?showtopic=52&view=findpost&p=131134)

if i get a popup with the class name of the toast just used send message WM_Close... :)

and hey presto :)
08-08-2006 10:25 PM
Profile PM Web Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. RE: RE: get the handle of a toast?
quote:
Originally posted by Shondoit
Why do you want to kill it?
MP!L has a lot of options for toast, you could turn toasts off for some events...

in my script clicking the toast focuses the conversation window. i want to make it so that if the user focuses the conversation window themself the toast kills itself. also, multiple toasts might be made for the same conversation window. i want to make it so that clicking one of them kills them all.

quote:
Originally posted by Stigmata
the way i used to do it in a old old old program

subclass messenger (tutorial in vb: http://forum.mess.be/index.php?showtopic=52&view=findpost&p=131134)

if i get a popup with the class name of the toast just used send message WM_Close... :)

and hey presto :)

thanks
i haven't coded in vb for at least seven years. is it possible to register the dll then call everything from jscript?

This post was edited on 08-09-2006 at 04:36 AM by AberNStein.
[Image: gybouserbar6hc.gif]
08-09-2006 04:34 AM
Profile PM Find Quote Report
Shondoit
Full Member
***

Avatar
Hmm, Just Me...

Posts: 227
Reputation: 15
36 / Male / Flag
Joined: Jul 2006
RE: get the handle of a toast?
You can use Interop.Call() for that
I will post a snippet later on


-EDIT- I did some testing, and it won't work, first of all, a toast does not have a caption, second, a toast uses 'DirectUIHWND' as a classname, this is the same as a conversation window...
If you want to find a toast, you don't have any way of telling a convo and a toast appart.
(MP!L uses '#32770 (Dialog)' as a Classname)

This post was edited on 08-09-2006 at 10:47 AM by Shondoit.
My scripts:                            [Image: shondoit.gif]
+ Timezone
+ Camelo
+ Multisearch
08-09-2006 10:33 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: get the handle of a toast?
quote:
Originally posted by Shondoit
MP!L uses '#32770 (Dialog)' as a Classname
And that immediately removes that avenue, since just about every single program written for Windows uses a window of the Dialog class. So using FindWindow() with the class '#32770' could retrieve a Word Format Paragraph dialog for example.

Don't worry Shondoit: I'm just adding, not correcting ;)
[Image: spartaafk.png]
08-09-2006 02:46 PM
Profile PM Web Find Quote Report
AberNStein
Full Member
***


Posts: 132
Reputation: 2
Joined: Jul 2006
O.P. RE: get the handle of a toast?
it seems i'm once again at the "code your own toasts" stage
gah
[Image: gybouserbar6hc.gif]
08-09-2006 08:46 PM
Profile PM Find Quote Report
« 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