May 31, 2022 02:11 PM
I tried to use input.buttonsASync but it’s impossible.
I receive this error:
“ERROR
TypeError: input.buttonsASync is not a function
at main on line 2”
Can you help me?
May 31, 2022 02:47 PM
Hi @Alessandro_Brunori
Can you post the full script?
let catOrDog = await input.buttonsAsync('Cats or dogs?', ['Cats!', 'Dogs!']);
if (catOrDog === 'Cats!') {
output.text('Meow');
} else {
output.text('Woof');
}
Works just fine.
May 31, 2022 03:05 PM
You have a typo. It should be buttonsAsync
not buttonsASync
Jun 01, 2022 03:00 AM
let invio= await input.buttonsAsync()
‘Confermi di voler richiedere la DICO?’,
[‘Sì’,‘No’],
)
Jun 01, 2022 03:01 AM
this is my code:
let invio= await input.buttonsAsync()
‘Confermi di voler richiedere la DICO?’,
[‘Sì’,‘No’],
)
Jun 01, 2022 03:43 AM
this is the debug
Property ‘buttonsAsync’ does not exist on type ‘{ config(): {}; }’.(2339)
Jun 01, 2022 04:43 AM
It seems like you mean script step in automation, not scripting app.
Script in automation designed to run without interacting with user, it has no usual scripting app functions to input and output data, only input.config() and output.set()
Jun 01, 2022 04:51 AM
thanks…i need to ask somebody if He wants to confirm automation. can you help me?
Jun 01, 2022 05:08 AM
Well, it may be a tricky task. Automation limited to 30 seconds of execution and some memory limit. What is your scenario - how the automation supposed to be triggered.?
Jun 01, 2022 05:17 AM
Automations run automatically when triggered. That’s what makes them automations. If you need to ask the user if the script should continue, you should use scripting app instead.