What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Change Control enable status

Change Control enable status
Author: Message:
WARlrus
New Member
*


Posts: 9
33 / Male / Flag
Joined: May 2009
O.P. Change Control enable status
Hi,

I'm making a settings box for my latest script, and need some options to be enabled/disabled depending on others.

I thought the following code would work:

code:
winSettings.GetControlHandle("EdtUseTag").Enabled=true;


But it doesn't. I know that in web-page JS I would use getElementById(), but that doesn't work either.

Thanks in advance :-)
05-19-2009 04:05 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Change Control enable status
You need to use the Win32 API.

Enable:
js code:
Interop.Call('user32', 'EnableWindow', winSettings.GetControlHandle('EdtUseTag'), true);

Disable:
js code:
Interop.Call('user32', 'EnableWindow', winSettings.GetControlHandle('EdtUseTag'), false);

This post was edited on 05-19-2009 at 04:21 PM by matty.
05-19-2009 04:21 PM
Profile E-Mail PM Find Quote Report
WARlrus
New Member
*


Posts: 9
33 / Male / Flag
Joined: May 2009
O.P. RE: Change Control enable status
Thanks for that!

Seems like a long way around a simple problem, I'm surprised there's nothing in the API about this!
05-19-2009 04:24 PM
Profile E-Mail PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Change Control enable status
http://shoutbox.menthix.net/basicsearch.php?do=se...9&lookin=msg&sort=
05-19-2009 04:31 PM
Profile E-Mail PM 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