Moving Mouse Location to Selected Files in Finder

Hey Everyone,

This might be a simply question. Might not;-) I'm writing a macro that searches for a group of files in finder. I'm able to activate the search bar within finder by typing keystroke "Command + F".
I'm also able to move the mouse location to look within a specific folder. I'm able to tab down to select the first file.

Using the Move, Click and Drag. I can select the files and put them into a music application.

I would like to repeat this function and select the next files in the file window.

I can re activate the finder folder and by pressing "Shift Tab" I can toggle down the next few files to select.

Is there a way to make the mouse go to the new selected files? If I could get the mouse to hover over the selected files in a window, that would be the best!

Thank you all in advance for looking at my post!

Is there someway to find the mouse coordinates of a selected file? And input these values into the Mouse Locator?

I just thought of a simple idea but need to try it out.

I can probably pause the macro until i perform a command right?
So the macro haults, I move my mouse to the location, I left click…

Then the Left Click triggers the rest of the macro, with moving the coordinates of the mouse 0 up and 0 over???

I’ll try it out…

You are on the right track, but you just need to make an adjustment.

You will need to use the Pause Until action (KM Wiki). However, there is not a "click" condition. See Conditions (KM Wiki).

What I usually do in situations like this is a modifier Key condition (KM Wiki), typically OPT-RETURN.

For example:

Ok,

I can still over the mouse cursor over what I want to select right? And then don’t move it?
Thank you for the quick reply!

There are much better methods than using UI commands to search for files and operate on the result.

Can you provide us with an example of your search criteria, and what operations you want to perform on the results?

Totally!

I'm trying to select a file and then search for all related files and select them. It's important that I see the selected files I need as well as the entire directory. I have 2 finder windows above each other, a parent directory and a search directory.

I want to be able to select a file within the parent directory and search for all RR1 within that search directory below.

With the top parent directory, I can right click once,
down arrow 11 times and press option + return
I can copy the resulting file's pathway.

After activating the search window below, I can press command + shift + G to paste in the pathway giving me the same directory.

now I can see all the files within specific folders and below I can ultimately search for specific files within the directory.

Now I can search the bottom directory for all RR1 and select the appropriate files I need to drag into Pro Tools.

I looked into searching the clipboard but don't understand how to copy the RR1 that I would find within in it. I would like to loop this command until I reach and import all files I need. I found some great counter information in other posts.

OK, please forget about using the Finder windows for a moment, and just describe your desired workflow in terms of objectives, not methods.

Questions:

  1. How do you select the initial file in the parent directory? What's the criteria?
  • What do you mean by "RR1"? Never heard of that.
  • Having selected a file in the parent directory, what directory do you then want to search for related files? Is it always the same, or do you need to choose it?
  • How do you determine if they are related?
  • Once you have found/selected the "related" files, what do you want to do with them?

Thank you for all the questions. Here all the answers.

I have recorded audio files that will make an instrument. The instrument has the same note recorded at different volumes, soft, medium and really loud. I have labeled my files as such
piano_C3_Soft_RR1
RR1 is round robin 1.

A round robin is basically a repeated take of the same note that will give a slightly different feel when played back.
If you record just one note and play it over and over again it will sound like a gun shot. You typically record at least 4 to get a good variety. These will eventually be selected at random later on with a sampler program when triggered by a keyboard.

To create a complete note there are different layers or volumes,
and in my case a bottom part being soft, a middle being the middle and the top being loud.

My objective is to find the 3 parts to complete a “file or note” that will make up the instrument.

There are hundreds of recorded wav files that are different volumes, different round robins and different notes. By searching for specific information, I can find the related files I need.

Sometimes the files are organized into different folders, sometimes they are all in one folder.

In my case all round robins and volumes of the same notes are in the same folder, the parent directory.

  1. In the parent directory I will have to eventually select and group all of parts that make up a note, the soft, medium and loud for the same file. So . I start with the very top note, just because I can select the next note underneath, tag my notes I’ve used and continue.
  2. The RR1 is above sorry.
  3. The directory changes, I figured that if I have all the folders I need in 1 smart search finder, i can search that directory for related files I need.
  4. I know that I need a soft, medium and loud for the same round robin 1. So I select all the RR1 and can see the soft, medium and loud.
  5. I want to select them and drag them over into Kontakt, an instrument sampler.

OK, thanks for the info.

OK, as I understand it, here is your basic workflow. Please confirm or correct.

  1. Open Finder to Parent Folder for music instrument of interest, like "Another Snare"
  • All files in this folder are for the same instrument.
  1. Search Parent folder for all files with "RR1" in the file name.
  2. Open these files in Kontakt (should be same as dragging)

If this is correct, I think it will be easy to automate without using Finder UI.

Questions:

  1. In your example post, you opened another Finder window to the same folder as the Parent folder, and then did your search. Why not just search in the original Parent folder?

Hey JMichaelITX,

You are correct with my workflow. What kind of automations do you recommend for searching Finder windows
without accessing and clicking Finder's UI?

So far i've been using 2 folders so I can see what I'm doing. I use the top folder as a guide or a list and eventually want to automate the the "search and add macro action" making it repeat over and over again searching for all files down the list... Instead of manually adding each individual set of related files, I would like to automatically build a loop to keep searching and adding until all the files in the folder or list are finished. With using a few User Prompted variables, I can alter the search and add settings to match the 2 folders and the way their content is presented.

It is a little complicated for a beginner programmer like myself! There are probably other ways to accomplish this that I'm not aware of. I can only think of using 2 folders so I can see what I'm doing.

Elvis, please take a look at this macro I just posted, built in response to your workflow. If this does not completely provide what you need, it should be a good foundation.

###MACRO: @Files Get List of Files in Folder Matching Criteria @Example

It does NOT require use of the Finder at all.
The macro will prompt you for the Parent Folder.

You will need to change two Actions to match your needs:

Set to the folder you always want to start from.
You will get a "Choose Folder" dialog starting in this folder, which you can then change on the fly.

Change to the app you want to open the found files in.

Please let us know if this macro works for you, and answers your basic question.

Just made an update:

2017-06-15 15:01 CT

• Added Confirmation of Open List of Files