Page 1 of 1
show for a determinate time
Posted: Sun Jan 23, 2022 9:18 pm
by Samuele
Hi, is ther a way i can show something on my stack just for a determinate time for example "show for 2 seconds"?
I tried with wait, but it causes some problems in the speed and sometimes even freezes the stack.
Thanks!
Re: show for a determinate time
Posted: Sun Jan 23, 2022 9:51 pm
by stam
Write a handler that does the hiding, let’s say in card or stack script:
Code: Select all
On hideStuff
# do hiding stuff
End hideStuff
On showing whatever needs to be hidden just call the hide handler at whatever time interval you want. E.g.
Code: Select all
On ShowStuff
## show status message or whatever
## after showing stuff, call the above handler:
dispatch “hideStuff” to this card in 2 seconds // or whatever interval
// assuming it’s in card script
End ShowStuff
Hope that helps…
Stam
Re: show for a determinate time
Posted: Sun Jan 23, 2022 10:39 pm
by Samuele
this script gives me an error:
Code: Select all
on hideStuff
hide btn "ToBe"
end hideStuff
On ShowStuff
show btn "ToBe"
dispatch "hideStuff" to this card in 2 seconds
End ShowStuff
Re: show for a determinate time
Posted: Mon Jan 24, 2022 12:05 am
by stam
sorry - change 'dispatch' to 'send'
example attached
Re: show for a determinate time
Posted: Tue Jan 25, 2022 11:50 am
by Samuele
stam wrote: ↑Mon Jan 24, 2022 12:05 am
sorry - change 'dispatch' to 'send'
example attached
Thanks, that's exactly what in was looking for!