showing an object at a specific time

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

showing an object at a specific time

Post by Glenn Boyce » Mon Aug 30, 2010 7:26 am

I'd like an object to show at specific times each day.

show group "QualityBanner" at 16:00

this syntax doesn't work.What should I have?

cheers

Glenn

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: showing an object at a specific time

Post by Klaus » Mon Aug 30, 2010 12:30 pm

Hi Glen,

get the time when your app starts, then calculate the seconds until 16:00.
Then "SEND" a handler that show your group in (the difference) seconds.

Something like this in your stack script:

Code: Select all

on openstack
  convert the time to secs
  put it into tStart
  convert "16:00" to secs
  put it into tEnd
  put (tEnd - tStart)/60 into whatever
  send "show_my_group" to me in whatever secs
  ...
end openstack

command show_my_group
  show grp "QualityBann"
end show_my_group
Best

Klaus

Glenn Boyce
Posts: 137
Joined: Thu Jul 24, 2008 11:22 pm

Re: showing an object at a specific time

Post by Glenn Boyce » Mon Aug 30, 2010 11:21 pm

Thank you

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: showing an object at a specific time

Post by Klaus » Tue Aug 31, 2010 2:00 pm

Hi Glen,

sorry, I made little mistake:
...
put (tEnd - tStart) into whatever
...

Do NOT divide by 60!
That was from my testing to see the past minutes instead of the past seconds.


Best

Klaus

Post Reply