Shoutbox

[Question] Plus window focus - 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: [Question] Plus window focus (/showthread.php?tid=80988)

[Question] Plus window focus by mynetx on 01-16-2008 at 05:48 PM

When I create a Plus window, it gets the focus.
How to give the focus automatically back to the window which had it before, or, better, don't give the focus to the plus window at all?


RE: [Quesion] Plus window focus by pollolibredegrasa on 01-16-2008 at 05:54 PM

Is this what you're looking for?

code:
MsgPlus.CreateWnd("Interfaxe.xml","WindowName",2);

quote:
Originally posted by Scripting Docs

[number,optional] If specified, this parameter can be one of the following numbers:

WNDOPT_NOACTIVATE (2)
Don't activate the window after its creation


RE: [Quesion] Plus window focus by mynetx on 01-16-2008 at 05:56 PM

Thanks.

Is there anywhere a documentation of those CreateWnd parameters?


RE: [Quesion] Plus window focus by Spunky on 01-16-2008 at 05:58 PM

quote:
Originally posted by Scripting Docs - MsgPlus.CreateWnd

Options
[number,optional] If specified, this parameter can be one of the following numbers:

0 - Display the window normally (default).
1 - Don't automatically show the window after it's been created.
2 - Don't activate the window after its creation.


So it would be

code:
var Wnd = MsgPlus.CreateWnd("Interface.xml","WndTest",2 /* or 1 */);


RE: [Quesion] Plus window focus by mynetx on 01-16-2008 at 06:01 PM

kk. Thanks @ all ^^
In some days, there will be a new script :)


RE: [Quesion] Plus window focus by warmth on 01-16-2008 at 06:09 PM

quote:
Originally posted by mynetx
kk. Thanks @ all ^^
In some days, there will be a new script :)
sorry that I ask... what about???

RE: [Quesion] Plus window focus by Dempsey on 01-16-2008 at 06:19 PM

quote:
Originally posted by mynetx
documentation of those CreateWnd parameters?
http://mpscripts.net/docs.php?p=ref-msgplus-createwnd.htm
RE: [Quesion] Plus window focus by mynetx on 01-16-2008 at 06:23 PM

quote:
Originally posted by warmth
sorry that I ask... what about???
About received URL links in chats.
RE: [Quesion] Plus window focus by warmth on 01-16-2008 at 06:55 PM

quote:
Originally posted by mynetx
About received URL links in chats.
ah ok... nice... I hope to see new features over the existing script about that...
RE: [Quesion] Plus window focus by mynetx on 01-17-2008 at 02:06 PM

So MsgPlus.CreateWnd(strFile, strWindowId, 2); creates a non-activated window.
But what if I create the window in advance with ....., 1);, and then use objPlusWnd.Visible = true; ?

The changing of the window property "Visible" to true gives the window the focus. How to show the window (and move it to top), but leave the focus in the window which had it before?


RE: [Question] Plus window focus by Matti on 01-17-2008 at 05:02 PM

The best thing you could do is add the TopMost element to your Window attributes. Eventually, you can add the NoActivate element to make it not activate when selected, so you can't ever focus it, although I don't know if that's what you want.

code:
<Window Id="MyPlusWnd" Version="1">
   ...
   <Attributes>
      <TopMost>true</TopMost>
   </Attributes>
   ...
</Window>
Then, just call CreateWnd with 2 as Flag.

By the way, the scripting documentation describes this very well... I think you should take some time to read it fully. ;)