Haiku’s GUI is in principle entirely scriptable. You can change a window’s position and size and manipulate pretty much every widget in it. The tool to do this is
hey. It sends BMessages to an application, thus emulating what happens if the user clicks on a menu, checkbox, or other widgets.