0

I have a non-open-source GUI program on OS X which has a menu button to open a file in one format (example.X), and another menu button to export a rendering of that file in another format (example.Y). This is not a conversion that could be done by myself or by any other tool I've found, as the rendering involves extensive digital audio synthesis.

I have a folder of 100 files of type X, and I want a convenient way to convert each .X file into a .Y file without manually opening and exporting each in the GUI. Literally just two simple commands which don't require interfacing with the GUI - one to open the file, and another to render it out.

Is there a general way to achieve the effect of opening a program, running some commands from the menu, and then exit via the command line?

Thanks!

Scott Stensland
  • 26,870
  • 12
  • 93
  • 104
lightning
  • 389
  • 1
  • 9
  • 1
    Use AppleScript, e.g. https://stackoverflow.com/questions/16492839/applescript-on-clicking-menu-bar-item-via-gui-script – TheNextman May 16 '19 at 18:29
  • `pyautogui` would be ideal... https://pyautogui.readthedocs.io/en/latest/introduction.html – Mark Setchell May 17 '19 at 14:38
  • Automator.app has an option to record and playback GUI interactions. Crude, but may be sufficient for your needs. – foo May 17 '19 at 14:58

0 Answers0