How to drop a file onto a GUI app from command line?

I've got a tool to normalize WAV audio files, but it only works by dragging and dropping the file either onto the GUI or onto its dock's icon.

As far as I know the app doesn't have any option to pass from command line, so I was wondering whether there is a way to pass the file from a terminal in order to use it in a bash script.


Solution 1:

Generally this is equivalent to dragging a file onto an app's icon:

open -a Your_WAV_Tool.app /path_to/your_file.wav

You can use the complete path to your app if it isn't in an expected place.