What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Set window size

Set window size
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Set window size
And don't forget that those HWND_TOP and other constants aren't pre-defined in JScript, so you'll need to look up their values. A good resource for that would be m00.cx's Win32 API constants list.

I hope the following example (which is almost identical to the previous replies) will show you how all this is used practically in a way that you and any other developer can understand what it does:
code:
//I define the constants globally, because you don't need to change them anymore in the script and you may need them in multiple parts of your script. If you're only planning to use those once, it may be more interesting to use something like DoThis(/* HWND_TOP */ 0) instead of using DoThis(HWND_TOP) with HWND_TOP defined globally.
var HWND_TOP = 0;
var SWP_NOMOVE = 0x2;
var SWP_NOZORDER = 0x4;

function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
   if(Message == "/sfix") {
      Interop.Call("user32", "SetWindowPos", ChatWnd.Handle, HWND_TOP, 0, 0, 700, 500, SWP_NOMOVE | SWPNOZORDER);
   }
}
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-21-2007 03:02 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Set window size - by Neon_ on 10-18-2007 at 10:01 PM
RE: Set window size - by deAd on 10-18-2007 at 10:03 PM
RE: Set window size - by Neon_ on 10-19-2007 at 02:07 AM
RE: Set window size - by Spunky on 10-19-2007 at 09:34 AM
RE: Set window size - by Neon_ on 10-19-2007 at 08:45 PM
RE: RE: Set window size - by felipEx on 10-19-2007 at 08:53 PM
RE: Set window size - by Neon_ on 10-19-2007 at 11:08 PM
RE: Set window size - by Spunky on 10-20-2007 at 05:43 PM
RE: Set window size - by Matti on 10-21-2007 at 03:02 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