|July 24, 2018|
Clipboard URL Tracking
Keyboard Maestro has the ability to perform certain actions based on an activity, such as when a USB card is inserted or when you connect to a network. It makes Keyboard Maestro a really powerful application.
Working with the Active Clipboard
One of the monitor activities is the ability to watch the clipboard. That got me thinking. What if there was a way to save the URL that I pasted in the clipboard? That way I can use it later whenever I like.
The goal would be watch changes pasted in the clipboard, and if there's a URL assign it to a variable.
This is the Macro that I came up with:
Some Notes on my Macro
I am using the matching condition because the URL can vary from http to https. I can change this even more by looking at certain URLs or Domains.
I am only concern with tracking events that I copy from the location field in Chrome or Firefox.
If the clipboard doesn't start with a URL do nothing.
I created another macro that would echo the value of ActiveURL whenever I type in show.url.
The nice thing is that I don't have to think about the activity, it just happens in the background.
There's a lot of other activity I can do with the URL, but that's a post for another day.
Add your Comments
Feel free to leave a comment about this post.