Using a variable with seconds

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
paulalsmith1000
Posts: 52
Joined: Sat Jun 15, 2019 10:09 am

Using a variable with seconds

Post by paulalsmith1000 » Fri Dec 20, 2019 11:06 pm

Evening anyone,

I'm not sure this is the right section, but I couldnt see anything similar on the other topics:

Could someone tell me if I can use a variable with seconds?

Ie instead of 'send command to me in 10 seconds,' I wanted to write 'send command to me in variable seconds.

This is because the app user chooses the above delay, but it doesn't work. It looks like it ignores the variable and treats 'seconds' as 1 second.

Any help would be much appreciated.

Klaus
Posts: 11730
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Using a variable with seconds

Post by Klaus » Fri Dec 20, 2019 11:23 pm

Hi Paul,

this works here:

Code: Select all

...
put 5 into tSecs
send "beepen" to me in tSecs seconds
...
and my handler "beepen" fired after 5 seconds!


Best

Klaus

Klaus
Posts: 11730
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Using a variable with seconds

Post by Klaus » Sat Dec 21, 2019 10:57 am

Since this is definitively NOT OFF-TOPIC, I will move this thread to the Beginners section. 8)

paulalsmith1000
Posts: 52
Joined: Sat Jun 15, 2019 10:09 am

Re: Using a variable with seconds

Post by paulalsmith1000 » Sat Dec 21, 2019 12:07 pm

Hi Klaus

Thanks v much.

You are a fountain of knowledge as ever.

Kind regards

Paul.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”