@ Nr.5-need_input
I use this
for purposes:
1st:
Test if the subroutine works good. When you want to test a subroutine, you need a caller to pass variable. But I find if you use this way, you dont need a caller to test subroutine. It's much easier to do test.
2nd:
Some subroutine can be executed independently. I use this way to Initialize starting variables.
I think this method is also from one post on this Forum. Maybe
TIP: How To Determine if Macro is Used a Sub-Macro, Called by a Execute Macro Action - Tips & Tutorials - Keyboard Maestro Discourse
https://forum.keyboardmaestro.com/t/tip-how-to-determine-if-macro-is-used-a-sub-macro-called-by-a-execute-macro-action/16572
Im not sure it's completely correct. But it appears in almost all my subroutine. And I never see strange thing happened.
But I think this is OFF topic. Go back to this post I keep thinking, go further I have two questions.
1st:
we input some file paths, then this macro show them in finder and select/hightlight them. But what if these files belong to different parent folder.
for example, our input is:
/Users/chris/Downloads/Office/3.txt
/Users/chris/Downloads/Office/1.txt
/Users/chris/Desktop/1.png
they belong to differnt folder. What to do in this case?
When you do search in Finder, you can see files belong to different folders appear as search result in one Finder window, can we do this with KM?
2nd:
is there a way to do this in Choose File prompt window?
NOTE that the Choose File prompt window can be opened by another non-Finder APP.
For example. when we want to upload files to Google Drive, we will see this File Choose window
NOTE that It looks like Finder. But I think this window is not belong to Finder, it belongs to Google Chrome. So if you want to do something in AppleScript, it has a lot of trouble here.
I ve been thinking about this for long time. cannot solve this.