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

Checkbox Changing
Author: Message:
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
34 / Male / Flag
Joined: Mar 2007
O.P. Checkbox Changing
Hey all,

Just wondering if theres an easy way to detect when a checkbox is changed, such as a WindowIdEvent?  I've been trying to make a new settings window and to have certain things changed depending on the startup status, and obviously this prevents WindowIdCtrlClicked working.
I have tried looking in the documentation, but didnt see anything, so assuming not, but I know you guys may know better, or ways around this.

I was also wondering if there is a way to change the status of muiltiple controls at once... such as to grey out 5 different controls depending on whether a specific checkbox is checked or not.

My thanks as always guys,
Leroux
[Image: adsig.jpg]
11-14-2008 02:38 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8337
Reputation: 109
34 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Checkbox Changing
code:
function OnWindowIdEvent_CtrlClicked(pPlusWnd, sControlId){}
11-14-2008 03:06 AM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
34 / Male / Flag
Joined: Mar 2007
O.P. RE: RE: Checkbox Changing
quote:
Originally posted by matty
code:
function OnWindowIdEvent_CtrlClicked(pPlusWnd, sControlId){}

Doesn't work at this part.  I'm just seeing if theres an easier way to change settings if a control is automatically set.  Its for a checkbox, so that if I select chk2, childwnd2 will be visible instead of childwin1.  Because I'm trying to pull it up auto, the chkbox doesnt actually get clicked, and so that event doesnt fire

- I've just added some more code to do the bit I need.  It's a bunch of extra lines, but doesn't make too much difference really.  Can anyone tell me if it is possible to make checkboxes greyed out, and if theres any way to control groups at a time?  Cheers guys

This post was edited on 11-14-2008 at 04:26 AM by ArkaneArkade.
[Image: adsig.jpg]
11-14-2008 03:11 AM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8337
Reputation: 109
34 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Checkbox Changing
PM me exactly what you are trying to do and we will go from there.
11-14-2008 10:34 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
25 / Male / Flag
Joined: Nov 2006
Status: Away
RE: Checkbox Changing
try out this:
code:
PlusWnd.Button_SetCheckState("checkbox1",true);

and also:
code:
function OnWindowIdEvent_CtrlClicked(PlusWnd, ControlId){
if(ControlId == "checkbox1"){
var checked = !PlusWnd.Button_IsChecked("checkbox1");
Interop.Call("user32","EnableWindow",PlusWnd.GetControlHandle("control1"), checked);
Interop.Call("user32","EnableWindow",PlusWnd.GetControlHandle("control2"),checked);
Interop.Call("user32","EnableWindow",PlusWnd.GetControlHandle("control3"),checked);
Interop.Call("user32","EnableWindow",PlusWnd.GetControlHandle("control4"),checked);
}
}

This post was edited on 11-14-2008 at 10:43 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
11-14-2008 10:43 PM
Profile PM Web Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
34 / Male / Flag
Joined: Mar 2007
O.P. RE: Checkbox Changing
Sorry guys, I'm obviously not being very clear, so my apologies.  I know how the set the boxes to checked.

I was trying to make an advanced settings window, with a single checkbox to enable.  Then a bunch of radio controls, that I was hoping to "grey out" to make read only, unless the checkbox was enabled.

As far as I can tell from the documentation its not possible, so no need to worry about it.  I can do a script without... it was purely a matter of asthetics and so, doesn't matter in the least.  Cheers anyways.

Matty: Thanks, but it really didn't seem worthwhile enough to bother you further.  I'm sure you've got other important things, so no need to worry about relatively pointless things.  Much appreciated though man.  :D
[Image: adsig.jpg]
11-14-2008 11:38 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8337
Reputation: 109
34 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Checkbox Changing
Do you mean something like this:

[Image: attachment.php?pid=937376]

.jpg File Attachment: ex.jpg (108.34 KB)
This file has been downloaded 142 time(s).
11-15-2008 03:39 AM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
34 / Male / Flag
Joined: Mar 2007
O.P. RE: Checkbox Changing
Actually matty, yeah.  The send link checkbox is exactly what I mean, but with multiple radio controls all to be activated/deactivated according to the checkbox.
[Image: adsig.jpg]
11-15-2008 05:25 AM
Profile E-Mail PM Web Find Quote Report
felipEx
Scripting Contest Winner
***


Posts: 378
Reputation: 24
30 / Male / Flag
Joined: Jun 2006
RE: RE: Checkbox Changing
quote:
Originally posted by Leroux
Actually matty, yeah.  The send link checkbox is exactly what I mean, but with multiple radio controls all to be activated/deactivated according to the checkbox.
In that case, what roflmao456 has posted can help you out... :D

for example:
code:
var checked = PlusWnd.Button_IsChecked("yourCheckbox");
var radiocontrols = new Array("RadA", "RadB", "RadC", "anyOtherRadioControl...");

for (var i in radiocontrols) Interop.Call("user32","EnableWindow", PlusWnd.GetControlHandle(radiocontrols[i]), checked);
[Image: 3030739147_3b8aabc0be_o.png]
11-15-2008 06:44 AM
Profile E-Mail PM Find Quote Report
ArkaneArkade
Full Member
***

Avatar
The One and Only

Posts: 193
Reputation: 5
34 / Male / Flag
Joined: Mar 2007
O.P. RE: Checkbox Changing
In that case, many apologies to roflmao456.  I took a look at the code and my limited knowledge led me to it being another method to check boxes.  I'm going to try it out now.  thanks roflmao456 and filipEx
[Image: adsig.jpg]
11-15-2008 06:55 AM
Profile E-Mail PM Web Find Quote Report
« 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