run script to display time since launch & let the user perform actions

Hi,
I need to run a script that controls a text field that display a count of seconds since the application was launched, while the user could preform actions at the same time without altering the count. Any ideas?

Thxs

hi gecko,

When the app starts up, you store the start date.

global start_date

on will finish launching theObject
set start_date to (current date)
end will finish launching

Then you get the current date and the seconds difference:

set cur_date to (current date)
set s to cur_date - start_date – number of seconds since start

gl,

gecko,

Download my Timer program, I think the idle handler in it will help you. It’s very similar to what you’re talking about.

An idle handler will continue to update your count while other things are able to go on around it.