What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [problem] Buttons in windows

Pages: (5): « First [ 1 ] 2 3 4 5 » Last »
[problem] Buttons in windows
Author: Message:
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. [problem] Buttons in windows
ok, so i made a window, i got help with that, but...

i dont know how to make buttons do actions, such as close, open, navigate, stuff like that...

Thanks In Advance.
[Image: waynewilson2@hotmail.com-12.png]
10-22-2007 08:40 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [problem] Buttons in windows
code:
function OnWindowidEvent_CtrlClicked(PlusWnd, ControlId){
switch(ControlId){
case "control-id-of-button": // when a button with this id is clicked..
PlusWnd.Close(1); // Closes the window
break;
case "control-id-of-another-button":
Interop.Call("user32","MessageBoxW", 0, "Button 2 has been clicked", "some script", 64); // Displays a message box.
break;
}
}

yeah so "PlusWnd.Close(1);" closes the window.
replace "Windowid" with your window's ID.
[quote]
Ultimatess6
: What a noob mod
10-22-2007 09:41 PM
Profile PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
TYVM roflmao, you seem to be able to help out alot...lmfao
from now on, if i need help, imma talk to you first...

oh, and another thing i was wondering about... how do i put textboxs and stuff like that in??

This post was edited on 10-22-2007 at 11:06 PM by waynewilson2.
[Image: waynewilson2@hotmail.com-12.png]
10-22-2007 11:01 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: [problem] Buttons in windows
For textboxes... change
'Control type:xsi="ButtonControl"'

to

'Control type:xsi="EditControl"'

in the xml file
<Eljay> "Problems encountered: shit blew up" :zippy:
10-22-2007 11:22 PM
Profile PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [problem] Buttons in windows
quote:
Originally posted by SpunkyLoveMuff
For textboxes... change
'Control type:xsi="ButtonControl"'

to

'Control type:xsi="EditControl"'

in the xml file

and to get the text from the textbox (or other controls):

code:
Debug.Trace(PlusWnd.GetControlText("textbox-id-control"));

will pop up in your debug.
[quote]
Ultimatess6
: What a noob mod
10-23-2007 12:51 AM
Profile PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
ok, thanks for that stuff, also, i just thought of sumthin else... how would i make it log the text within the box to a file? lol, im new to this crap, im good with other stuff, but unfortunately not that...

the windows are the only thing i've had probs with so far...

This post was edited on 10-23-2007 at 05:30 AM by waynewilson2.
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 05:29 AM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
30 / Male / Flag
Joined: Nov 2006
Status: Away
RE: [problem] Buttons in windows
quote:
Originally posted by waynewilson2
ok, thanks for that stuff, also, i just thought of sumthin else... how would i make it log the text within the box to a file? lol, im new to this crap, im good with other stuff, but unfortunately not that...

the windows are the only thing i've had probs with so far...

http://www.tutorial-web.com/asp/fso/

i think it's

code:
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.OpenTextFile(MsgPlus.ScriptFilesPath + "\\log.txt",2,true); // will create log.txt in your script files path
file.Write(PlusWnd.GetControlText("textbox-id"));
[quote]
Ultimatess6
: What a noob mod
10-23-2007 08:13 PM
Profile PM Web Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
ok TYVM...again lol
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 08:16 PM
Profile E-Mail PM Find Quote Report
waynewilson2
Junior Member
**

Avatar

Posts: 55
Joined: Oct 2007
O.P. RE: [problem] Buttons in windows
ok...new problem :( when reading an array, how would i go about comparing that array to another string, kind of like a filtering system? lol

Thanks In Advance
[Image: waynewilson2@hotmail.com-12.png]
10-23-2007 08:49 PM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: [problem] Buttons in windows
code:
var Arr = new Array("123","456","789","456","abc","jkl","omn","456");
var Str = "456"
for(i=0; i<Arr.length; i++){
if(Arr[i] == "456"){
Debug.Trace("Arr["+i+"] == 456");
}
}

that should put this in the debug:
Arr[1] == 456
Arr[3] == 456
Arr[7] == 456
10-23-2007 08:54 PM
Profile PM Find Quote Report
Pages: (5): « First [ 1 ] 2 3 4 5 » 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