How to run code on start up
Posted: Sun Nov 15, 2015 7:34 pm
I want to run some code (a clock) as soon as the program starts (ie not have to have a button pressed for the code to start). Is there a way to do this?
Thanks
Thanks
Questions and answers about the LiveCode platform.
https://www.forums.livecode.com/
Code: Select all
on preOpenStack
set the flag of me to not the flag of me
if the flag of me then startTimer
end preOpenStack
on startTimer
set itemDelimiter to " "
put item 5 of internet date into me
if the flag of me then send startTimer to me in 0.5 second
end startTimer
Code: Select all
on preOpenStack
set the flag of me to not the flag of me
if the flag of me then startTimer
end preOpenStack
on startTimer
set itemDelimiter to " "
put item 5 of internet date
if the flag of me then send startTimer to me in 0.5 second
end startTimer
on mouseUp
preOpenStack
end mouseUp