1.) Clock Timer disabled inplicit? 2.) Screen (or Arrangment) enabled/disabled

Hello!
when a timer is running, is it like a pipe, or is it working with a inplicit Timer off/on command?
Background: If the Timer Job takes more time than the value of TimerIntervall what will happen?

Once you start a timer, it will run each X milliseconds interval (set by you) and continues to run until you disable it. If the task within the timer takes longer than the time interval, it will not be completed.

TestAndInfo.aia (5.8 KB)

2.) when a Timer is running... is it possible to stop screen (and its elements) with a single Command?
"Normal"
Start: For each Button in screen enabled = false

Thank you ChrisWard, very exakt and very helpfull!

I see that you disable the timer the moment it starts, which is good practice.

I don't understand your question Rudolf.What do you mean by "Stop Screen"? What is happening on the screen that should be stopped until the timer has stopped?

I see that, within the timer Block, you have two intervals to apply - that, if you excuse the pun, is a waste of time :grin:

If you want the content of the timer Block to run several times in succession, just disable at the top of the Block and enable at the bottom of the Block. It can be permanently disabled from a separate Block when required.

Note that these are Android System timers - low priority and not super accurate, depending what else the device is doing at the time, how fast the processor is etc.

When the timer is enabled = true, the other Buttons, Pics etc are still clickable. In this example Timer is only changing the background color. When the timer is running you can click on Button1 during Timer runtime.
If you are setting all the Buttons in a loop of Enabled = false you are loosing the enabled true/false property.
When the timer is enabled off, the restore loop Button Enabled = true, set all Buttons to Enabled = true, even when the Buttons was enabled = false at Timer starttime.
Question: Is there a Frame or something like that you can push to enabled = false/true without changing the properties of the Frame members?

Hi Rudolf

I'm especially dumb this evening, sorry. There is no concept of a 'frame' in App Inventor, so not sure what you mean.

Is your concern this: The timer is run to disable some buttons, but while the timer is running it is possible for the User to still use those buttons? If that is what you mean:

  1. If possible, do not disable the buttons via a timer, disable them directly via an event such as a button click;
  2. ......or have those critical buttons inside an Arrangement, make the Arrangement momentarily invisible (buttons therefore untouchable) while disabling the buttons. Ugly, but that should work.

Hello ChrisWard,
it is just for a game, pushing cards one after the other to screen. A timer is doing this job. If the timer is busy all objects shoud be enabled = false. It is something like Screen.BlockInput or Screen.Enabled = false

That can't happen if the Screen were to be disabled. So in terms of Components, what App Inventor component is used to represent a card?

... I'm away for approx an hour

There are 9 Buttons and 3 Pics on the screen.
List1: Button1, Button2... Button9
List2: Pic1, Pic2,Pic3
ListMemoryButton
ListMemoryPic
Global ListMemoryButton.Clear
Global ListMemoryPic.Clear

For each ... Button in List1
If Button enabled = false ListMemoryButton add.item
Button enabled = false

For each Pic in List2
If Pic enabled = false ListMemoryPic add.item
Pic enabled = false

Timer is running...

Timer is off

For each ... Button in List1
If Button is not in ListMemoryButton... Button enabled = true

For each ... Pic in List2
If Pic is not in ListMemoryPic... Pic enabled = true

Hard work...

Looks straight forward, except for the reason to have a timer...