Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Two commands/api calls in menu button - possible?

December 06 (4 years ago)

Hello basically title - is it possible to somehow (like using AND, OR, or something else) have to commands/api calls in one button (without adding them to macro and calling macro from button

example

[Button](!dosomething AND !dothat) or [BUTTon](!tellajoke,!roll1d20)
December 06 (4 years ago)

Edited December 06 (4 years ago)
Oosh
Sheet Author
API Scripter

It is, but they're still executed at the same time, so you can't modify something in the first one and read it in the next, or do anything else you wouldn't normally be able to do by linking another macro. Separate them with a new line:

[Button](!apiScript --args
!apiScriptTwo --command)


The closest you can get to an OR statement is just a Query:

[Button](!?{Which script?|Script 1,apiScript --args|Script 2,apiScriptTwo --command)


There's no conditional logic available in chat - if you want real conditionals you'll need to do it within the API script itself.

December 06 (4 years ago)

Thats enough for me. I dont need no logic - was just hoping there will be way to run sequence instead of making more and more macros. 


Thanks