Skip to main content

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?

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.




You have a typo. It should be buttonsAsync not buttonsASync


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.




let invio= await input.buttonsAsync()



‘Confermi di voler richiedere la DICO?’,



‘Sì’,‘No’],



)




You have a typo. It should be buttonsAsync not buttonsASync


this is my code:


let invio= await input.buttonsAsync()



‘Confermi di voler richiedere la DICO?’,



r‘Sì’,‘No’],



)


this is my code:


let invio= await input.buttonsAsync()



‘Confermi di voler richiedere la DICO?’,



‘Sì’,‘No’],



)


this is the debug


Property ‘buttonsAsync’ does not exist on type ‘{ config(): {}; }’.(2339)


this is the debug


Property ‘buttonsAsync’ does not exist on type ‘{ config(): {}; }’.(2339)


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()


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()


thanks…i need to ask somebody if He wants to confirm automation. can you help me?


thanks…i need to ask somebody if He wants to confirm automation. can you help me?


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.?


thanks…i need to ask somebody if He wants to confirm automation. can you help me?




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.


Reply