I have a bunch of macros that I'm triggering by hitting buttons on my Stream Deck. One action in each of these macros opens a file, and the only difference between each of these macros is which file is being opened. As a result, I have duplicate macros, each with a different file specified.
The KMLink plugin for Stream Deck can pass on a parameter, which can be pasted using Insert Text β%TriggerValue%β by Typing. Would it be possible to reduce this to one master macro that uses the parameter passed on from KMLink to choose from a range of files to open? I am imagining a group of multiple Open File actions, one of which will open if it receives its expected parameter text.
This would be pretty great to figure out, so many thanks in advance for any help you might be able to offer.
Hi @noisneil - there was a discussion I contributed to about using the parameter. Have a look at my example macro that makes use of it to perform different actions depending on what the parameter is (and depending on the SD button that was pressed).
Here's what I'm dealing with. With the exception of the two macros I've darkened out, these all load UAD Console presets (an audio routing app). As you can see from the highlighted example, each of them opens a different preset file.
I've been using the KMLink parameter box with great success for simple text pasting, but converting that into choosing a file to open had me scratching my head.
The good news is the Switch idea works great! I set the clipboard to variable %TriggerValue% and then use the Switch/Case action to create the list. Perfect!!!!
Yeah, no need to have all those macros when one will do. You set up a popup list in which the value is the destination file and the displayed option is the "contains" string you used in your macro. Then just one Open action will act on the value passed to it.
For an example of this (which lets you write a simple text file to make the associations for applications, file and folders), see A Few Favorites Macro. Or, you know, just use that .
I'm a bit slow on the uptake today. Are you saying there's a more efficient way to do it than what I've done? Which action do I use to do the same thing but with one Open action instead of multiple for each file?
Prompt with List using ~/Documents/Universale/Audio/etc/filname__File I Want as the list format (so you see File I Want but get the filename path stored in the variable the action returns.
Open as you have it but with the variable used in the above.
These are the last two actions in the macro I referred you to.
Simply putting the entire file path in the Stream Deck parameter box. Why didn't I think of that before?! Is there's some advantage to your method over this?