Help

Impossible to use input.buttonsASync

Topic Labels: Scripting extentions
2749 9
cancel
Showing results for 
Search instead for 
Did you mean: 
Alessandro_Bru1
5 - Automation Enthusiast
5 - Automation Enthusiast

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?

9 Replies 9

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

let invio= await input.buttonsAsync()

‘Confermi di voler richiedere la DICO?’,

[‘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)

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?

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

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.