I am trying to call /Applications/Audacity.app/Contents/MacOS/Audacity with the first argument being an AUP project file, but Audacity does not open that project - it opens empty. I tried using Audacity.sh too, with no success. And I need to keep the “Audacity” instance running on the terminal, so “open -a” does not work for me.
I’ve not tried this on a Mac, but my guess is that you’ve probably not got the path to the file correct. Try using the fully qualified file name, in double quotes, after the audacity command.
On Linux (and it’s probably the same on a Mac), if you navigate to the folder where the project file is, and run the command from there, you can just use the name of the file without the file path.
Don’t forget that you need the “.aup” at the end of the file name.
Don’t forget that if the file name has spaces, it needs to be quoted.
Thanks for the reply. I tried everything you said. In fact, I was using some scripts on Linux successfully, but they do not work on macOS because of this odd behaviour. I really think this is a bug, but would like to confirm if there is some “special” command I am missing to open AUP from the binary.
As I explained, open command will not work for me because it will just open the file and return to the terminal… I need the command to keep locked until I close the Audacity, just like Linux and Windows.
In my case, I need some information Audacity’s stdout provides while the aup is opened. But for you to understand, consider that I need to call audacity executable from the terminal and I need to know (the script needs to continue some tasks) after the project is closed.
I explained before, I just want the macOS executable to open an AUP from the terminal just like it happens on Linux and WIndows.
What information?
Sorry, why does it matter? This is something very specific for my case… if I get some stdout info or if I verify the lack of it… I just need to open an AUP with the binary from the terminal.
How do you know that Audacity sends that information to stdout on macOS?
I am not able to know because it does not open an AUP file when I call it just like
I’ve had a look into the code, and in AudacityApp::OnInit(), passing file list arguments via the command line is implemented for Windows and Linux only:
#if !defined(__WXMAC__)
for (size_t i = 0, cnt = parser->GetParamCount(); i < cnt; i++)
{
// PRL: Catch any exceptions, don't try this file again, continue to
// other files.
SafeMRUOpen(parser->GetParam(i));
}
#endif
I have asked on the developer’s mailing list for clarification on why this is.
Correct, so I removed this and recompiled on a mac to make it work for me. That’s because it is working now for my case. As I said, must be a reason, this is a planned bug.