Welcome to the forum!

An API method is probably the only way to do it. When I did it in the past, I used this one. http://patorjk.com/programming/tutorials/apispy.htm
It allows you to record vbscript code for some things.