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

Question on Journal Command Buttons

March 10 (3 years ago)
Nick O.
Forum Champion

I'm looking at this article, https://wiki.roll20.net/Journal#Journal_Command_Buttons and I've been able to successfully create links that send text, dicerolls, and run macros using the link button method described. The article goes on to explain about API Command Buttons, but I can't figure out how to get those to work from a handout.I've tried

`[MyButton](!MyMacro) 

and 

`[MyButton](!
#MyMacro)

But those don't work. Can someone let me know where I'm going wrong?

March 10 (3 years ago)

I found a way to activate a script from a handout via a link, not a button.  To activate a script from a handout, type the name as `!NameofScript into the handout as a link, with whatever text. Save the handout, and the link will activate the script.

March 10 (3 years ago)

Edited March 10 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

You just select the text in the handout, and insert a hyperlink. The hyperlink is the call, no backtick needed, (though it doesn't hurt, either).

March 11 (3 years ago)
Nick O.
Forum Champion

Is it supposed to appear as a button, though? Everything appears as a link. Maybe I'm misunderstanding? Here's what I have:

March 11 (3 years ago)

Edited March 11 (3 years ago)

Try [Hello](`#Hello)

March 11 (3 years ago)
Andreas J.
Forum Champion
Sheet Author
Translator


Nick O. said:

Is it supposed to appear as a button, though? Everything appears as a link. Maybe I'm misunderstanding? Here's what I have:

Haven't seen any discussion saying it would look like a button. This seems to me just a general "trick" of Roll20, and not something they made extra things for. I'd think you might need to use a bunch of html/css to make the link resemble a button, if that's important to you. Could be wrong though.


March 11 (3 years ago)
Nick O.
Forum Champion

Ah, ok. I get it now. You can create a link that puts the button into the Chat. I misunderstood and thought it would put the button onto the handout. Thanks everyone!

March 11 (3 years ago)
keithcurtis
Forum Champion
Marketplace Creator
API Scripter

Ah, I should have thought of posting a screen shot.