Here is my use case:
-
I have tens of thousands of sound files which are encoded in a proprietary format and I need to update the attributes (instruments, categories, tags, author) within them. However, I do not have access to how the files are encoded.
-
Many years ago, the creator of the file format made a utility that allows you to update the attributes without divulging the encoding scheme.
-
The utility is very basic. Its UI consists of a single window with editable text fields for the four attributes. There are no menus, buttons or even an "Open file" command. All it does is re-encode any files (one or many) dropped onto its window but replacing the file's existing sound attributes with any you typed in.
-
I have a table in a SQLite database where each row contains a filename, file path and the new attributes I have defined for each file.
-
I created a KM macro that iterates through the rows in the table. Every time any of the attributes change from one row to the next, the macro pauses, opens a finder window and selects the set of files between the previous and current change.
-
The macro then populates the editable fields in the utility with the new attributes.
-
At this point, I have to manually drag the selected files from the finder and drop them onto the utility so they can be updated with the new attributes.
-
Once I do this, I press continue and the KM macro resumes processing rows until the next change, etc.
I suspect this utility was written using the JUCE framework which forgoes standard MacOS programming toolkits for the sake of cross-platform development. This means that standard AppleScript type commands will not work.
So, can anyone suggest a way to automate the last piece of the puzzle which is to drag and drop any files selected in the foreground Finder window and drop them onto the utility's window?
Thanx.