Automate execute command mikrotik when remote using winbox

Is it possible automatically executing commands when remote mikrotik router with Winbox uses the command line?

It makes more sense to use API or SSH. What are you trying to automate? Are you somehow limited to WinBox?