Device inactivity script

I've noticed that you can run scripts with the device inactivity option.  I'm able to show a message to the device, but is it possible when they press a certain button there will be a action afterwards. I would like to close an app when pressing OK.. Could someone help me out?

for example

showmessagebox "error message"  NO_TIMER 4
if %ShowMessageBoxReturn% == IDOK goto KillBrowser command (kill_application com.honeywell.enterprisebrowser)
if %ShowMessageBoxReturn% == IDCANCEL goto Exit

a year ago
Android Scripting
ANSWERS