WAIT_FOR_BUTTON_PRESS - Wait for the user to press a specific button

WAIT_FOR_INPUT - Wait for the user to press any button.

When to use them

Wait for the user to press physical buttons. Both WAIT_FOR_BUTTON_PRESS and WAIT_FOR_INPUT offer ways to pause execution and prompt the user for input without opening a full dialog.

WAIT_FOR_BUTTON_PRESS

Syntax

WAIT_FOR_BUTTON_PRESS [button] 

button required

Wait for a specific button to be pressed. Buttons are ANY, A, B, UP, DOWN, LEFT, and RIGHT

Results

WAIT_FOR_BUTTON_PRESS pauses the payload until the requested button is pressed

WAIT_FOR_INPUT

Syntax

WAIT_FOR_INPUT 

Results

WAIT_FOR_INPUT pauses the payload until a button is pressed

WAIT_FOR_INPUT returns the button pressed on output. The button will be one of A, B, UP, DOWN, LEFT, RIGHT

Examples

  LOG "Press 'A' to continue!" WAIT_FOR_BUTTON_PRESS A
  
  LOG "Press any button to continue!" __button=$(WAIT_FOR_INPUT)