See the Raw Commands section at the top of How to use buttons and scripts from this forum for how to create a button which runs a command.
See the Raw Commands section at the top of How to use buttons and scripts from this forum for how to create a button which runs a command.