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

DateTimeControl
Author: Message:
NiteMare
Veteran Member
*****

Avatar
Giga-Byte me

Posts: 2497
Reputation: 37
37 / Male / Flag
Joined: Aug 2003
O.P. DateTimeControl
I stumped the might -dt- on this one:

How do i set the value for a DateTimeControl, from inside the script?

the SetControlText doesn't work, the GetControlText works, to grab the info, but set doesn't?
[Image: sig/]
I'll never forget what she said 6860 days, 7 hours, 13 minutes, 24 seconds ago
Need hosting? Check
out my website. we can help you out :)
07-01-2006 05:33 AM
Profile PM Web Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: DateTimeControl
My guess is that you need to send DTM_SETSYSTEMTIME message. :)

More information: http://msdn.microsoft.com/library/en-us/shellcc/p..._setsystemtime.asp
07-01-2006 07:59 AM
Profile PM Web Find Quote Report
NiteMare
Veteran Member
*****

Avatar
Giga-Byte me

Posts: 2497
Reputation: 37
37 / Male / Flag
Joined: Aug 2003
O.P. RE: DateTimeControl
quote:
Originally posted by Mnjul
My guess is that you need to send DTM_SETSYSTEMTIME message. :)

More information: http://msdn.microsoft.com/library/en-us/shellcc/p..._setsystemtime.asp
cool, thanks
i'm not really that good at understanding those things, can you give me an example to learn from?
[Image: sig/]
I'll never forget what she said 6860 days, 7 hours, 13 minutes, 24 seconds ago
Need hosting? Check
out my website. we can help you out :)
07-01-2006 08:02 AM
Profile PM Web Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: DateTimeControl
after a lot of testing and swearing this works :P

code:
var DTM_SET_SYSTEMTIME = 0x1002;
var GDT_VALID = 0;

var SysTimeStruct = Interop.Allocate(16);
SysTimeStruct.WriteWORD(0, 2006); //Year
SysTimeStruct.WriteWORD(2, 1); //Month (1-12)
SysTimeStruct.WriteWORD(4, 6); //Day Of Week (0-6 = Sunday-Saturday)
SysTimeStruct.WriteWORD(6, 1); //Day Of Month (1-31)
SysTimeStruct.WriteWORD(8, 12); //Hour (0-23)
SysTimeStruct.WriteWORD(10, 12); //Minute (0-59)
SysTimeStruct.WriteWORD(12, 12); //Second (0-59)
SysTimeStruct.WriteWORD(14, 500); //Millisecond (0-999)

PlusWnd.SendControlMessage('DateTimeControlId', DTM_SET_SYSTEMTIME, GDT_VALID, SysTimeStruct.DataPtr);

This post was edited on 07-01-2006 at 09:47 AM by Eljay.
07-01-2006 08:46 AM
Profile PM Find Quote Report
NiteMare
Veteran Member
*****

Avatar
Giga-Byte me

Posts: 2497
Reputation: 37
37 / Male / Flag
Joined: Aug 2003
O.P. RE: DateTimeControl
The time doesn't work:(
[Image: sig/]
I'll never forget what she said 6860 days, 7 hours, 13 minutes, 24 seconds ago
Need hosting? Check
out my website. we can help you out :)
07-01-2006 09:52 AM
Profile 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