Shoutbox

External scripts - 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: External scripts (/showthread.php?tid=88171)

External scripts by ArkaneArkade on 01-07-2009 at 07:50 PM

Hey guys,

I'm having problems with one of my scripts not reverting back to images well enough, so I've decided to just forgo the method I was using and call an external script for it instead.  I know (or at least think) theres no built in method to do this, but the script I wanna run has message commands, so I'm gonna try it that way.

Problem is, I can't quite find out what it is I'm doing, and was hoping someone may be able to give a small pointer.

Basically, I was thinking of checking the chatwnd count, and if its 0, open a chat, send the message, tehn close the chat - although I cant find how to close a window.

Alternately, I read once that plus can open chats to yourself?  is this actually possible, because I seem to be failing at it.  I'm considering perhaps that it may be better to just open a chat to yourself every time (I dont expect this function to be called often) and send the command, but I'm unsure of how this may affect the system (I'm currently on a old, dodgy PC after killing my good ones drive).

Any pointers?  cheers all


RE: External scripts by matty on 01-07-2009 at 08:30 PM

To close the Chat Window

Javascript code:
var pChatWnd = Messenger.OpenChat('johndoe@hotmail.com');
pChatWnd.SendMessage('this is a message');
Interop.Call('user32', 'SendMessageW', pChatWnd.Handle, 0x10 /* WM_CLOSE */, 0, 0);


RE: External scripts by ArkaneArkade on 01-08-2009 at 04:23 AM

Cheers matty.  That works perfectly.  Only problem is if I send a message to an already open window... but I think I have it sending to one that should never be open, so no probs.
Thanks man