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

Ask numerical value in a macro

Hello everyone, I have an API script that changes the value of an attribute with a command like: !attrib attribname|desiredValue. I would like to do a macro which runs the script but asks me for desiredValue! How could I do that?
1632432606

Edited 1632432661
David M.
Pro
API Scripter
Something like this? !attrib attribname|?{Enter a value|0} Or this (no default value) !attrib attribname|?{Enter a value}
1632432656

Edited 1632432703
timmaugh
Roll20 Production Team
API Scripter
!attrib rawcharisma|?{New Value|@{selected|rawcharisma}} That would assume that you have the token selected, but given your command line, I assume it has to be. The default value for the query is the current value of the attribute, so you can figure from there. EDIT: NINJA! =D
It works! Thanks to both