Skip to main content

Impossible to use input.buttonsASync

  • May 31, 2022
  • 9 replies
  • 56 views

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

Forum|alt.badge.img+16
  • Inspiring
  • 529 replies
  • May 31, 2022

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.


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • May 31, 2022

You have a typo. It should be buttonsAsync not buttonsASync


  • Author
  • Participating Frequently
  • 5 replies
  • June 1, 2022

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’],

)


  • Author
  • Participating Frequently
  • 5 replies
  • June 1, 2022

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?’,

[‘Sì’,‘No’],

)


  • Author
  • Participating Frequently
  • 5 replies
  • June 1, 2022

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)


Alexey_Gusev
Forum|alt.badge.img+25
  • Brainy
  • 1261 replies
  • June 1, 2022

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


  • Author
  • Participating Frequently
  • 5 replies
  • June 1, 2022

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?


Alexey_Gusev
Forum|alt.badge.img+25
  • Brainy
  • 1261 replies
  • June 1, 2022

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


kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • June 1, 2022

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.