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

Hi @wildbill,

Alternatively, you can write your own program on your PC in you language of choice that talks to the Arduino over Serial and then you can build a custom interface that sends whatever you like.

Do you mean something like PySerial using python?
Actually, I have been trying to use it, but I confronted some weird problem there.

Whenever I do serial.write() (which a function for sending data), nothing occurs. But the expected output comes out when I turn on the serial monitor on IDE...

Here is some of my code of python using pyserial:

import pandas as pd
import serial
import time

arduino = serial.Serial(port='/dev/cu.usbmodem14101', baudrate=115200, timeout=10,write_timeout=10)
time.sleep(2)
arduino.flush()

if arduino.isOpen():
  #this is function for sending data 
    send_data(arduino,"hello")
    print("1st input done")
    time.sleep(4)

    a = arduino.readline().decode().strip()
    print(a)
    if "me too" in a :
        print("success")
    else:
        print("failed")
    arduino.close()

in Arduino, I programmed it to print "me too" when it receives "hello" string.
So the thing is, whenever I run this code on python, always this code ends up printing "failed".
But when I turn on the serial monitor from IDE, suddenly "me too" word pops up from the serial monitor.