How to send commands without typing it on the serial monitor?

Hi,

I want to send data string without using typing it on the serial monitor.
Would there be any way of doing this?
For example, if I entered "a" on the serial monitor,
string command "1001" should be sent to the port automatically as if I'm entering it on the serial monitor and pressing send button.

Thank you.