Running Tasks via Multiple Application Pipelines

Not just no, but Hell No!

Do not rely upon recording for anything – it's like hunting and pecking instead of typing and fraught with misspellings...

Recording can be useful for various things like recording clicks or menu selections – but you have to understand KM a bit – before you can tweak the results as necessary to do the right thing.

More specifically, watch for an audio file -> open a loudness meter app (if it isn't already running) -> load the file into the app -> perform any subsequent task I require based on the reading given by the app.

  • How many files will be added to the watched folder at once?
  • What app?
  • What reading?
    • How is the reading presented?

If you haven't read these they're worth a couple of minutes of your time.

  • I create audio mixes using Logic Pro to a folder (1 at a time)
  • I want KM to open the YLM (YouLean Loudness Meter) when the audio file has completed writing to the folder (Could take up to 3 minutes)
  • And then load the completed audio file into YLM (drag and drop is supported)

If I could automate things after that point based on a specific value generated by the YLM app that would be great but I don't "think" KM would be capable of making an assessment of the reading since the app is UI and not a CLI. If the YLM app were able to place the readings into a file, then I suppose KM could then execute a subseqent action based on the reading but unfortunately thats not the case.

Hope that provides a bit more clarity

I'll read your tips as well. Thanks

There's also a "File analysis..." menu item, which might be easier than macroing a Drag-and-Drop. Does that work for what you want?

YLM can export to CSV, which you could analyse via KM if the CSV contains the values you need. But a) I'm ignorant, and b) there's a lot that is unavailable in the YLM free version -- so you'll have to suck it and see!

Ok I'll look into the File Analysis. Since this is all new to me IDK if that will suffice what I'm trying to do but it's definitely a starting point that I didn't have before my post. I have the PRO version so I'll explore the export file.

I think my biggest obstacle right now is understanding how and what macros I should use to interact with other apps. That's why I was going with the recording option since it seemed the path of least resistance on the learning curve for me. But I'll take your advice and try to delve a bit deeper.

It looks like "File Analysis..." is what a proper Mac program would label "Open..." -- so fundamentally the same as drag'n'dropping a file onto the window. But do your own comparison, just in case.

Unfortunately YLM isn't a standard Mac app, so you've picked a tricky thing to start your KM journey with! Without menu items to give you access to the functions you require, take a look at actions like "Move or Click Mouse", which can use a found image as a target -- that could get you into YLM's Share Sheet to do the Excel export, for example.

Man, the usability of Youlean Loudness Meter 2 as an app fails to impress...

The fact it doesn't support drag and drop from the Finder onto the Finder-icon or the Dock icon is something I'd take up with the dev.

You can't use open from the shell either...

1 Like

Bounce and Process Audio File.kmmacros (2.1 KB)

So my first post to the forum was dealing with this same task I'm trying to accomplish but a saw no way to use the recommended "Share" option when posting while targeting an already existing post. Apologies.

I've taken a stab at this and have began a macro trigger that monitors a folder for audio files created in the directory. I selected to ignore partial or changing files but I think I should probably change it to ignore partial files only so the trigger doesn't engage until writing to the audio file has completed.

Next I selected the action to open an application. So far looks good but the next step I need to happen is a drag of the audio file to the opened app and I don't see a drag/drop action.

How might I do that?

Actually you might not need to drag and drop. I don't have that app, but maybe you can open the file via its path, using the %TriggerValue% token...?

Bounce and Process Audio File.kmmacros (20 KB)

Macro screenshot

If that's not an option, you can try using the menu system to open the file:

Bounce and Process Audio File.kmmacros (24 KB)

Macro screenshot

I downloaded the free demo version for this, so I don't know if things work differently in the pro version. Hopefully it will give you an idea though.

Thanks for this! I'd already considered opening the file via the app as you'd initially suggested but unfortunately the targeted app won't open audio files. But I'll get that one a shot to see what happens.

Your 2nd macro I follow until it gets to the Type Keystroke step and below. I don't fully understand what those steps are supposed to be doing though I can make out a couple of them.

I'll try both and see where things go. Thanks!

  • ⇧⌘G opens the Go To... file navigation pop-over window.
  • We use this to navigate to the file you're trying to open by literally typing in its path, stored as a %TriggerValue% and then hitting ↵.
  • Lastly, we hit the Open button to load the file into YouLean.

Ah okay. I get that. Well that said and with the noted inability of the app to actually open the audio file; gets me a few steps closer but since it appears there is no actual drag/drop capability in KM.... I'll still have to figure some alternative method of getting this to work end to end.

I know recording a macro isn't ideal per comments from my previous post but I think that would be the only option I have. Which really isn't very intuitive for this type of task b/c it seems to only work if the source and target items and windows are unchanged being based off x/y co-ordinates.

Been looking into Hazel as well but seems it lacks the ability to assess a completed file from one being written. :face_with_diagonal_mouth:

Can you open a file from YouLean's menu system? If you can, you can automate it with KM. That's what my second idea attempts to do.

There absolutely is, but it's what I'd call a 'brute force' method, and wouldn't be my first port of call. We can get to that if the menu idea is a non-starter.

Hazel will work, but you'll still have to solve how to open the file once you have its path.

Don't worry, this is all doable.

So your macro appears to work up until opening YLM but for some reason the File -> Analyze File operation never fires. Also noted that even if I manually open that menu the next condition of the "Open button" being enabled won't happen until navigation to the actual file and its selection is made.

Any suggestions?

Btw, I also acknowledged and enabled safe execution via KM popup for imported macros

Is YouLean selected in the Pause Until action?
Also check the Menu action. I set it up to reference the free version so I'm not sure if it needs adjustment.

Try changing it to "exists" rather than "enabled".

Yes. But I did try changing to "exists" which appears to have fixed the problem. So now any time a new file is dropped in the folder it launches YLM, opens the file analyze and loads the file correctly.

There are still a couple of steps I'd like to figure out how to accomplish but this is definitely a very good start.

I don't suppose there is a way to read the values on specific areas of the YLM UI and run additional macros based on the values is there? Or any UI for that matter.

My initial thought was to export the readings and then run a script that would execute additional steps based on if then else.... but the YLM app only exports graphical content in PDF, PNG and etc. Reading through the forum it appears there is a way to extract content from a PDF file but it seems creating a macro for that type of task is a bit more advanced than I'm ready to tackle w/o being more familiar with the basics.

Did you change the pause action to "is running"?

"Is at the front" will likely be more reliable.

Yes, there is but it's not straightforward unless you have UI Browser.

What is it you want to do to the files?

I did change it trying to figure out why the open dialog wouldn't pop but I changed it back to "Is at the front".

The YLM produces these readings on the UI which I'm most interested in. The INTEGRATED and AVG. DYNAMICS (PLR) values are my targets. In this screenshot they're within the target I need. So I'd want to evalute the numbers -16.0 LUFS and 14.2 LU and given this example I'd want to move the files to another location for permanent storage otherwise they'd be deleted from the processing folder.

Screen Shot 2023-04-12 at 4.06.00 PM

I looked at the UI Browser option but I think its more money than I'd be willing to spend when I have no other applicable use cases to justify the investment.

"Not straightforward" suggesting it as a bit complicated I'd imagine?

It can be done and I'd be happy to do it for you, but unfortunately I don't have the pro version of the app, so I can't even analyse a file, which makes it hard for me to test.

There are other ways beside UI Browser to figure out the AppleScript requirements, but they're certainly more longwinded. Are you au fait with AS or would you need someone to help you with it?

If you have more than one licence, you could loan me one while I figure it out for you and then take me off when I'm done. Just a thought.

I am a developer but AS isn't a language I'm very familiar with and I have too much on my plate right now to take on the venture :slightly_smiling_face:

Please check your PM's though.

1 Like

I'll have a go in the morning. :+1:t3: