Select files in Finder

Hello @Yu_Cai :wave:

Here is what Jim posted 4 years ago …

It’s nothing else than I was saying… to determine if a Sub-Macro was triggered by another Macro the Strings have to be different - not the same …

Subroutines (KM10+) are working in the same way … but they can only truly be tested when called from another Macro with parameters, defined via Local or Instance Variables. If you don’t have them defined at the time the Subroutine is triggered it will not act as Subroutine - it acts as a normal Macro or even possible, as Sub-Macro instead…

I have nearly 200 Macros that are written to either be used as main Macro or Sub-Macro as well - and I have more than 500 Macros written to either be used as Main Macros or called via Subroutine Parameters.

To make it clear .. No.
Files can only be selected this way if the Location they are in is exactly the same. As soon as there is another Location available, each file in that location has to be selected from another execution instance of the Macro.

What I can say here is that every File inside a Open File Dialog is handled as a reference to the original File in its original Location.

Maybe it could be done when it is possible to combine talking to the Open File Dialog Instance via GUI Scripting and using the Files as references in AppleScript but

  • that’s far away from what I am able to do with AppleScript.

  • I even don’t have a clue if something like this is possible with AppleScript.

Even in Open File Dialogs - especially there - it is impossible selecting Files from different Locations.

If the location is a .savedSearch (Smart Folder) you are working with the File references (aliases) of the original Files in their respective original Locations. Not the original Files. But it is possible getting the original File‘s Locations from these aliases in bulk and the File Aliases will all be available for selection but the Location (the Smart Folder) is treated as it is - a single Location. As if it would be a normal Folder.

Greetings from Germany :de:

Tobias