date object stuff

New releases and general discussions.

Post » Mon Feb 02, 2009 10:06 pm

i basically want to create an alarm clock program but currently the Date object seems insufficient.

for conditions, you can only query the date -- i'd like to be able to keep track of what time it is and set conditions based on that. it'd also be nice if construct could know what day of the week it was, so i could set different conditions for weekdays/weekends.

also, the action 'Set to current date/time' doesn't seem to work right. it will work when the layout initializes, but it never updates. so even though i did this to workaround not being able to have time-based conditions (i was going to compare text) --

System: Always (every tick)
> DateSet to current date/time
> TextSet text to Date 0 .GetHour
> Text2Set text to Date 0 .GetMinutes

it never updates. so if i open the software at 4:03pm, it is always stuck at 4:03pm. In debug, the Date object only shows the calendar date (also, this may be a bug -- right now it says it is 02/02/109)
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Fri Feb 06, 2009 3:02 am

oh and off-topic, but i'd like an "on control released" condition
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Fri Feb 06, 2009 11:18 am

"GetDayOfWeek" should do fine for the first query.

I also added a new 'Set to current time', which fixes your second query.

However, you may wish to have an 'every 20 ticks' or so instead of Always, to lower cpu usage.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest