User Input for Multiple Files/Locations

What I'm trying to figure out is using the "Prompt for User Input" action, being able to search and locate folders and then use those folders as variable for copying to directories later on. I need the ability to pop up a file explorer and search from there. Does anyone know if this is possible? Attached it what I'd like it to be able to look like when its all said and done.

If you are asking if you can trigger a Finder-like Choose Folder from within a KM Prompt for User Input, then, sorry, but the answer is no, at least not with native KM features.

However, it appears that it can be done using another Macro which uses AppleScript to prompt the user to Choose a folder.

Example Output


So, the main macro is:

MACRO:   Choose Folder from Prompt for User Input

<a class="attachment" href="/uploads/default/original/3X/5/8/580506317849fc2651642f6e78666e5198dd19da.kmmacros">Choose Folder from Prompt for User Input.kmmacros</a> (2.1 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**




### MACRO:&nbsp;&nbsp;&nbsp;Choose Folder & Paste

~~~ VER: 1.0&nbsp;&nbsp;&nbsp;&nbsp;2019-05-09 ~~~

<a class="attachment" href="/uploads/default/original/3X/7/4/7442c5677d793767d49d5ad77cb451b20dbe2317.kmmacros">Choose Folder & Put on Clipboard.kmmacros</a> (2.3 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**



I notice the AppleScript is wrapped inside

tell application "SystemUIServer"

What does this do ?

As I'm sure you know, all AppleScript dialogs should be in some app tell block.
SystemUIServer can be used sometimes where other apps don't work so well.
I chose it because it allowed the KM Prompt to keep focus, so that the script/macro could do a paste into the Prompt field.


Now that is clever. I've learnt something new. :+1:t3:

1 Like