Silvyre said: Not sure if this helps, but you could escape the @ signs such that the Attributes are only called when the button is clicked, and not when the button is sent to the chat. Escaping it by \@, \\@, or encodeURIComponent('@') hasn't worked. Scott C. said: I think it is due to the fact that api command buttons resolve their attribute calls when they are outputted, not when they are clicked (at least this is how it works for roll queries) EDIT: What happens if you do a formatted button (a la using the makeButton function from Aaron's scripts)? I know I've used those with roll queries before, might work for these as well. makeButton = function(command, label, backgroundColor, color){
return templates.button({
command: command,
label: label,
templates: templates,
defaults: defaults,
css: {
color: color,
'background-color': backgroundColor
}
});
},
Could you provide a link to wherever his library is in the Roll20 API repo? Roll queries work fine, but I might try this for selected and target as well.