I’d like to create a prompt that I can use to add files to proces with a macro.
The basic idea is to have a prompt with an ‘add file’ button.
Clicking the button will open a dialog window in which you can choose a file that will be added to a list of paths (like a variable array maybe?) of files to proces with the macro, then repeat until you’ve added all the files you want to add.
I’ve tried using the ‘Prompt for file’ action, so far without luck.
I’m kinda new to this, so maybe there is a simple way to do this that i overlooked?
Any ideas how to get this idea to work, or if it’s even possible with KM?
Here is an example macro to get you started.
It is NOT a finished product. You will need to adapt it to fit your needs.
Please let us know if this answers your question.
####DOWNLOAD:
<a class="attachment" href="/uploads/default/original/2X/2/28700dd5f50d842b607a2b35096513d9dfe1cb73.kmmacros">Prompt for File @KM8 @Test @Example.kmmacros</a> (11 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
###Use Case
* Build a List of the POSIX Path of User Chosen Files
---
###ReleaseNotes
Author.@JMichaelTX
**NOTICE: This macro/script is just an _Example_**
* It is provided only for _educational purposes_, and may not be suitable for any specific purpose.
* It has had very limited testing.
* You need to test further before using in a production environment.
* It does not have extensive error checking/handling.
* It may not be complete. It is provided as an example to show you one approach to solving a problem.
**MACRO SETUP**
* **Carefully review the Release Notes and the Macro Actions**
* Make sure you understand what the Macro will do.
* You are responsible for running the Macro, not me. 😉
.
* Assign a Trigger to this maro.
* Move this macro to a Macro Group that is only Active when you need this Macro.
* ENABLE this Macro.
.
* **REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:**
* ALL Actions that are shown in the magenta color
* All KM Variables in this Macro have the prefix of "TEST__"
* You should change this prefix to fit your macro.
**USE AT YOUR OWN RISK**
* While I have given this limited testing, and to the best of my knowledge it will do no harm, I cannot guarantee it.
* If you have any doubts or questions:
* **Ask first**
* Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.
---
<img src="/uploads/default/original/2X/8/8e7a1b6215fd6e7fffa72b83bfa1316f0903503a.png" width="229" height="767">