What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » help with msgplus windows please

Pages: (2): « First [ 1 ] 2 » Last »
help with msgplus windows please
Author: Message:
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. help with msgplus windows please
i was just wondering, how, if its possible, to change the width of a Msg Plus Window that i created, i have a var assigned to it, it is 'tehwin' but the way i want to change the size of it is by using a button, or command.
Thanks In Advance

---Wayne Wilson
[Image: waynewilson2@hotmail.com-12.png]
11-04-2007 07:43 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: help with msgplus windows please
Here you go! For more options, check out the SetWindowPos MSDN page. ;)
code:
function SetWindowSize(PlusWnd, Width, Height) {
   var HWND_TOP = 0;
   var SWP_NOMOVE = 0x2;
   var SWP_NOZORDER = 0x4;
   Interop.Call("user32", "SetWindowPos", PlusWnd.Handle, HWND_TOP, 0, 0, Width, Height, SWP_NOMOVE | SWP_NOZORDER);
}

//Usage
SetWindowSize(tehwin, 500, 400);

This post was edited on 11-10-2007 at 04:04 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
11-04-2007 07:57 PM
Profile E-Mail PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: help with msgplus windows please
thanks

code:
        if (PlusWnd.Height > 63){
            SetWindowSize(tehwin, 533, 310);
        }else{
            SetWindowSize(tehwin, 533, 62.5);
        }

can you tell me whats wrong with this? it changes to the smaller size, but not back to the bigger one...
[Image: waynewilson2@hotmail.com-12.png]
11-04-2007 08:04 PM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
RE: help with msgplus windows please
What do you mean "won't change back to the bigger"? Are you clicking the same button twice, or are you manually resizing the window before calling the function?

I'll guess that you need to change "if (PlusWnd.Height > 63)" to "if (PlusWnd.Height < 63)" (less than).  Can't be sure this would be your issue but it's the only thing making sense to me immediately.
[Image: adsig.jpg]
11-04-2007 09:39 PM
Profile E-Mail PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: help with msgplus windows please
quote:
Originally posted by Leroux
What do you mean "won't change back to the bigger"? Are you clicking the same button twice, or are you manually resizing the window before calling the function?

I'll guess that you need to change "if (PlusWnd.Height > 63)" to "if (PlusWnd.Height < 63)" (less than).  Can't be sure this would be your issue but it's the only thing making sense to me immediately.

nah, greater than is what its supposed to be, and each way it should resize the window...

the way it should be is
if (PlusWnd.Height > 63){
will check if the window is taller than 63px, and if it is then it will make it smaller, and otherwise, it returns it to the original size, but it will only call the else, it will not call the main portion...i tried changing the symbol to greater than, and still nothing...
[Image: waynewilson2@hotmail.com-12.png]
11-05-2007 01:07 AM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: help with msgplus windows please
i think you can use Interop for this; you can try using a variable (boolean) instead.

i think "PlusWnd.Height" only returns the height that's in the XML.
[quote]
Ultimatess6
: What a noob mod
11-05-2007 01:11 AM
Profile PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
38 / Male / Flag
Joined: Mar 2007
RE: help with msgplus windows please
OK, my mistake.  As I said, I know nothing of windows.
It's not that  you're stating (PlusWnd.Height > 63).  PlusWnd is only really the identifier used in the MPLScripting docs, so shouldn't it be (tehwin.Height > 63). 
That would explain why it always calls the else - if no window by name of PlusWnd exists, then none can be >/</= to anything, so it will always be the else clause.
[Image: adsig.jpg]
11-05-2007 01:16 AM
Profile E-Mail PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: help with msgplus windows please
quote:
Originally posted by Leroux
OK, my mistake.  As I said, I know nothing of windows.
It's not that  you're stating (PlusWnd.Height > 63).  PlusWnd is only really the identifier used in the MPLScripting docs, so shouldn't it be (tehwin.Height > 63). 
That would explain why it always calls the else - if no window by name of PlusWnd exists, then none can be >/</= to anything, so it will always be the else clause.

no...its in a control click function...tehwin and PlusWnd do the same thing

This post was edited on 11-05-2007 at 05:38 AM by waynewilson2.
[Image: waynewilson2@hotmail.com-12.png]
11-05-2007 05:36 AM
Profile E-Mail PM Find Quote Report
Volv
Skinning Contest Winner
*****

Avatar

Posts: 1233
Reputation: 31
34 / Male / Flag
Joined: Oct 2004
RE: help with msgplus windows please
Err, I think the most important problem here is that Pluswnd.Height is not a valid property...

The only valid properties for a PlusWnd Object are
PlusWnd.Handle
PlusWnd.Visible
PlusWnd.WindowId

This post was edited on 11-05-2007 at 05:48 AM by Volv.
11-05-2007 05:47 AM
Profile PM Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: help with msgplus windows please
ok, then how would i get the height of the window?? lol
[Image: waynewilson2@hotmail.com-12.png]
11-05-2007 05:48 AM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » 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