Stream Deck / Copy URL

Hi All,
I'm using Stream deck and storing some URL's.
I'd like to execute KM to copy the URL that launches when I press a specific key and paste it in the previous active window I was writing into before pressing the Stream Deck key.
I suspect there is a way but could not find a simple solution with the existing commands.
Thank you,
Philippe

Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.

If you haven’t had the opportunity to read this tutorial, I highly recommend it. It will help you get the most help for your question.

Tip: How Do I Get The Best Answer in the Shortest Time?

That being said, could you be a little more specific with what you mean by "I'm using Stream deck and storing some URL's"? Are you using the SD to store URLs and launch them? Or are you storing them via KM or some other method?

-Chris

Hi Chris,
Thank you for your reply.
yes, the URL's are stored in a button.
My idea was to use a multi-action in SD: launch the URL, copy the URL, close the tab, paste URL in previous active window.
KM SD

Hi Phillppe,

This is something that can be accomplished through KM alone to be honest. I have a variety of website shortcuts that either open in their own window, or a specific window that is already open.

For instance, while in a browser window, your KM macro could consist of either the following action to open the URL in a new tab:

Or if you want to open the URL in the active tab (and not just the window), then you could do something like this:

How you go about storing your URLs is another matter, but I imagine you stored them manually in the SD button to start, so doing that with KM would be a similar process (you could just duplicate your original macro and update the URL portion[s] of it for each webpage you wanted to save).

Hope this helps, but if you have further questions we're always glad to help more. :grin:

-Chris

Perhaps you could have a step in your multi-action to open a KM macro that does what you want like so:
kmtrigger://macro=UID-GOES-HERE?value=ENCODED-URL-GOES-HERE?

1 Like

That's a great idea and one I hadn't thought of since I always forget about that feature.

so the URL is already "stored" in te StreamDeck button, now what I need to do is run a macro that will copy that URL, and then paste it in the previous active window I was currently typing in before pressing the Stream Deck button. Any idea how to accomplish this?

@devoy thank you, that's the part inside KM I'm trying to figure out: Would you happen to know?

I'm using Stream deck and storing some URL's.
I'd like to execute KM to copy the URL that launches when I press a specific key and paste it in the previous active window I was writing into before pressing the Stream Deck key.

I have only a vague idea of what you are trying to do, but what I understand is:
On the stream deck you have a button that opens a URL, and you would like to paste that URL into "the previous active window"

One thing you could try would be to create a single KBM macro that "pastes the URL into the previous active window", using a URL that is passed to that macro and accessed via the %TriggerMacro% token. Then you would have to change your SD button and add an action that would call this new KBM macro using the URL: kmtrigger://macro=UID-GOES-HERE?value=ENCODED-URL-GOES-HERE

("ENCODED-URL" becomes %TriggerValue% in the macro. The down-side is that you'd have to record the encoded URL manually, thus storing the same thing twice in your button. But there's no way I know of to manipulate anything but the button image and title from KBM, and even then you can only write to them.)

Well..if you are opening your URL in a browser, you can use KBM to get the URL from the browser window. Then you're just adding an action to call the macro, but no "?value=…" needs to be passed.

I think you should use the URL as a parameter in the StreamDeck button setup and then pass it to KBM as %TriggerValue% in the places you wish to use the URL in the KBM macro. So basically, one KBM macro called by the SD button, with parameter "YourURLhere", and the KBM macro contains actions that do what you want (launch the URL and then copy it somewhere and whatever else), with each part of the Macro using %TriggerValue% for the "name" of the URL.
NOTE: i use the KMLink custom plugin for KBM macros on my StreamDeck - not sure if the "official" KBM SD action works the same way with parameters

2 Likes

If, by chance, this was not resolved, could you post the conditions that exist when you want to do the thing you want the macro to do, and the ending conditions that you want to exist after you’ve run the macro? Starting conditions include: program A is open, the insertion point is B, Stream Deck has a button programmed that does C, the currently active program is D, and so on.