I have a problem with the batch importing the files with the name containing some letters.
The problem lies in the fact the Finder tends to search the whole Mac instead of the selected folder if it's executed from the other app. Like File/ Open dialogue. There is no option that can change it.
Currently I'm pressing tab to get to the search field, type the letters, then ask KM to click on Video and Audio folder (I have the same folder structure for the every Nuendo project) and after that select all and press OK.
But it's not stable. For instance, I need to import the file containing MX in the name. And as it turned out, I have a lot of files on my SSD having MX in the name. So, the app should wait until the search results get populated, as the selected folder (Video and Audio in my case) field is inactive, not clickable until that. And it's not the same amount of time every time.
I can of course import them one by one, opening File/ Import Audio dialogue for the every file but it's slow.
The question:
Is it possible to make the selection in File/ Import Audio (or any similar) dialogue with the KM command? Like tell the paths of the needed files bypassing search field? And not doing it one by one?
File/ Import Audio
Finder window gets opened
Some command make the needed file to be appeared and selected in this window.
Here is the part of the macro I use to import the audio:
Seems the Apple Script should do that, but AI can't help me with the correct code :-). It make the code which selects the files in the finder window outside of the app.
tell application "System Events"
tell process "Nuendo"
-- Wait for the window to appear (adjust timeout as needed)
repeat with i from 1 to 20 -- try for 20 seconds
if exists (window "Import Audio") then exit repeat
delay 1
end repeat
tell window "Import Audio"
tell scroll area 1 of splitter group 1
tell outline 1
set rowList to every row
repeat with aRow in rowList
-- Get the name from the static text within the row
set itemName to (value of static text 1 of UI element 1 of aRow) as text
if itemName contains "DX" and itemName ends with ".wav" then
-- Select the row
select aRow
end if
end repeat
end tell
end tell
end tell
end tell
end tell
So, are you saying that from an App's open file dialog box you want to first go to a specific folder where you have your files saved and then search within that folder?
There are ways to do that by incorporating the Mac's standard ⇧⌘G shortcut (go to a specified folder) in a Macro. Or you can use a great plugin that @noisneil has made:
I'm assuming you can't reorganise your projects so the MX files are in one subfolder, DX in another, etc.
Does Nuendo import correctly if you select an alias of the file you want to import? If so you could create a temporary folder containing aliases of all "MX"-named files in your project, then bring up the "Import" dialog, navigate to the temporary folder, ⌘A, and import everything you need.
No, the case is: I receive the same files for the every projects. Video file and tree audio files if it's a TV show episode or a few video files and and a few three audio file sets for the each videos. And the task it just select the folder and let macro to place them into the project onto the certain tracks.
That's why I need to navigate to the specific folder and select the specific files to import. I can use ⇧⌘G but I need to select files then.
The problem is the selection in this window with no use of the search field
If you have the multiple selected files in the Finder and specify the App to open them (you haven't named the App you are using) do they get imported into the App?
For example, assuming you get the list of files into a KM Variable:
Reorganising the "Video and Audio" file with a sub-folder for "DX" files, another for "FX" files, etc
Adding "MX alias", "DX alias", etc folder and putting aliases of the files into the right "alias" sub-folders
Creating a temporary folder in /tmp and putting aliases to the required files in there
All of these can be done as part of your processing macro.
In each case that gives you a much simpler Import -- ⇧⌘G to go to the correct folder, ⌘A to select all the files or aliases, hit the "Import" button.
You will find it difficult to reliably select files in the way that you are trying to do at the moment -- there's simply too much that can go wrong. So side-step the problem entirely by using one of the methods above.