New KM user here, so please excuse the amateur question.
I work in two different music application programs.
One of them is notation and the other is recording.
I'm trying to build a macro that will copy the file name of the currently open application and then open the 2nd application, create a new file and do a "Save As" and paste the file name from the 1st application.
Could someone point me in the direction of how to create a macro that would accomplish this?
Hi @abw89, welcome to Keyboard Maestro (KM) and its Forum.
KM is one of the best Mac automation tools available, its Forum is one of the best and friendliest forums on the Internet. Whenever you reach a tough stumbling block trying to use KM, please feel free to post your question/problem here for help.
Now, to your request.
Your requirements statement is actually very good. Thanks for that.
The hardest part is getting the file name of the file currently open in the first app.
I don't have either of these apps, so I can't test or inspect them.
The best method is to use AppleScript with the App's scripting dictionary, which it may or may not provide. You will have to investigate to find out.
If the App does not provide a SD, then we can use UI scripting, as shown in this macro:
Thank you so much for your help and assistance with this macro.
When I ran the macro, I received an error: "Macro canceled due to script error" and "Unable to get File Path currently open in Digital Performer app. Digital Performer is the 1st application whose file name I am attempting to copy.
However, I ran the macro again with a different application at the front window that was something basic, such as Preview, and the macro worked.
How can I troubleshoot the AppleScript to get the file path of my recording application, Digital Performer, and avoid this error?
Sorry to hear that. Since I don't have the Digital Performer app, I am unable to test, inspect, or offer much advice.
Do you have a manual way of getting the file path (or file name) from DP?