Save File Macro (v11.0.2)

I finally figured out how to do what some couldn't understand my explanation. Thanks to David Sparks KM Field Guide on inputs.
The question now is how do I get KM to do this
It needs to start with
CleanShot 2024-05-14 at 17.29.54 I couldn't find that in the Field Guide.

Save File Macro (v11.0.2)

Save File.kmmacros (3.1 KB)

Keyboard Maestro Export

This is from Text Expander. Forget the ?file macro. A different macro all together. This is putting in a URL, in case you don’t understand that’s Universal Resource Link. Abbreviated down to URL. Do I need to re-explain that. That is what writing is with the https:// in front of it. The S shows it as a secure link. in the box now the snippet takes that and makes a link someone can click on and send that link to a DNS, Dynamic Name Server to translate the URL to actual address YouTube assigns my video. Why, so some one can watch that video if they desire. A macro would save me a lot of copying the URL by highlighting said URL and command c putting it in the clipboard and then command v and having it magically be typed out.

Here might be a better look see. Starts out -
CleanShot 2024-05-14 at 17.35.31

Then gives me
CleanShot 2024-05-14 at 17.36.28

The blue under the highlight indicates a clickable link.

The macro you uploaded asks for some data, then types it in…but it types it in wherever you happen to be when you run the macro. In my case, I had the title of your Prompt for Input box selected, so that got replaced with the data I had given it. That's not what you want, I'm positive.

To make this work, you need to get KM to switch to ... something ... where you want that data input to be typed into. So you collect the data, then use other KM actions to activate an app or look for an input box or something. But not just start typing it right away. Your example says something about a URL, but your input form doesn't ask for anything about a URL, nor does it look like the URL you listed in your post.

As a fresh start, can you explain what you want your macro to do, as opposed to providing the macro that isn't doing something that you expect it to be doing? What task are you trying to accomplish? Are you trying to enter a URL in that pop-up box? If so, where is that pop-up box, in a browser? Another app? Something else?

Without knowing what you're trying to do, it's very difficult to offer solutions that will help get that thing done.


The macro is what i did to save my files in the manner i save files. I type trigger ?file and i get input box for date, service choices, title and choices for file type. Was glad to finally figur pe it out.
Not associated with the html question. Sorry for the confusion.

Messages got merged together some how, they were separate at first,

  1. Posted macro of my save file. That lets me type date - 20240519 then choose the service from a list of choices - ams|pms|wpmc, then - then Title after that choose a choice from OUTLINE|SLIDES|NOTECARD. THEN it types that out for me in the file name area before I choose save. First message end.
    Next message that truncated:

I did a screenshot from a Text expander snippet how I enter a URL in the input. Once I do that it goes in that box as a clickable link. Again the two weren’t suppose to be related.

Into a box in what? And when do you make this URL input box appear? A hot key whenever you need it? I'm still confused on the overall objective.

If you were to describe the task that involves this URL input box from start to finish, what are the steps involved when you do the process by hand?


The overal objective is so I don’t have to copy and pasted the URL over and over again. See above edited explaination with screenshots. That pop up box, the box the URL Universal Resource Link goes in. is currently in Text Expander. I want it in KM - Keyboard Maestro. I want to for an Assigned YouTube, that’s where I post my Videos I create in my office on Fridays. I want to type ;ytams for a video posted on YouTube ams is AM or Morning the time that occurs before 1200 hrs. Local so any time between 0000hr. To 1200 hrs. After that it becomes PM and would be triggered by ;ytpms the s is sermon C is class. So I copy the URL Universal Resource Link that YouTube assigns the video into that pop up, pictured. And get the blue letters indicated when you move your mouse over it, it will magically take you to the DNS Server that will translate that to the four sets of octets, separated by periods the actual address of that video.
Example of use. I use MailChimp, not the monkey but a mailing program. At the bottom of my saved mailer, the notice I send chaps on the mailing lis, you know a list of email, similiar to how you get a letter at your house but magical through the bottom of that mailer I have RUMBLE |YOuTube | Facebook. Each of those have assigned an URL as stated above the Universal Resource Link. I choose example YouTube go to the infinity symbol in edit mode, that where you make changes to the form. And clink get a popup, different from the one in Text Expander, where I put my cursor and type, wait for it, ;ytams and get that URL Universal Resource Link (locator) placed in there turning the YouTube blue indicated you can put your mouse on the blue YouTube and be magically taken to that video. Now maybe just maybe you understand how that works.

Please explain, one brief step at a time as bullet points, the workflow you want to achieve. Because, at the moment, you can do exactly what you want using Keyboard Maestro's Clipboard History feature -- copy a URL once in the morning, paste it from Clipboard History as many times as you want; copy a new URL in the afternoon and carry on pasting that.

99% of apps will treat a bare URL as a clickable link, without you doing anything. But if you want transform the copied URL, perhaps to make it a fully-formed link such as

<a href=''>This morning's sermon</a>

...then include those details in your workflow.

Insulting those trying to help you is not a good way to get help here. We asked for an explanation of your task, we didn't tell you to assume we've never used a computer, clock, or link before.

All any of us have asked for is a clear description of the task you are trying to accomplish, and you respond by insulting us.

I am done trying to help.


Im not trying to insult those who are trying to help. You weren't understanding me so I had to get back like I am teaching computers 101 or Network 101 and explain like I do in teaching. Now with that said here is what I have come up with.

YT ams Macro (v11.0.2)

YT ams.kmmacros (2.7 KB)

Keyboard Maestro ExportKeyboard Maestro Export100%75%50%

Create TopicClose

For fear of having my intelligence insulted. Problem with this. I need the URL I put into stay as the variable until I need to physically change it. Right now I get a prompt to put in usually via paste into the URL box. I know I don't want to do that with a list. This will change each week. I have a lesson say an ams that is AM service. Once Youtube asigns it a URL that will be the same for (;YTams) for the week so everytime I type the trigger I need that same URL to go in where I type the trigger. Next week I will get a new URL for that service lesson that will be different than this week. YouTube will have an amc, ams, pms, wpmc lesson. Same works for RUMBLE ams, pms, amc, wpmc that will be a different URL for each of the different service types. Once I get this worked out there will be four macros for RUMBLE, Four for YouTube and Four for Facebook.
I do hope I have explained that ok. If I need to make an mp4 maybe that would help. I need to get away from Text Expander. I like the app but to many hoops to jump through not having Internet availability at my office. I am watching field guide videos on KM as fast as I can to try and get it all sorted. I need to figure out how to get chatGPT to write my posts.

Start by reading the manual instead. You're carrying over a lot of baggage from Text Expander and it will help you to start from scratch. You don't need to learn the manual by heart, but it'll give you a good overview and an idea of where to look when you want something specific. It might even persuade you that using a "hot key" trigger would be better than your "typed string trigger" (another hold-over from TE).

If you've taught "Computers 101" you'll know about "setters" and "getters". You're doing both in your macro, which is why your variable's value doesn't appear to persist -- it does, you just keep over-writing it. So split your macro into two -- one that you run at the beginning of the week to set URL to the correct value, and another you use the rest of the week that pastes the value held in URL into whatever text area is active.

You can actually do that in one macro with different hotkey triggers -- but save that for "Computers 102". "Computers 103" is when you'll introduce a "data structure" to hold all the different services' URLs in one place and combine all four service-based macros into one that does the correct action's according to context. But keep it simple for now and get the first bit working.

Thank you sir. What I have on my stream Deck is a button that lets me push and open my page to upload my mp4 direct into YouTube.

I will probably have Stream Deck run the triggers for me for each of the Video services.

I think, in this particular case, I might actually suggest that it's easier to start with the dual-trigger macro—it's one less macro to manage. Maybe it's Computers 101.5 :).

(Aside: Mike and I have messaged and worked out our differences; we were both frustrated, he over the support he was getting and me over the information we never seemed to get from him. All is good now.)

The attached macro has two triggers, and will behave differently depending on what trigger is used. Generally speaking, @Nige_S is right: Typed string triggers are a TextExpander way of thinking, and those trigger types are most useful when typing text. For everything else, there's almost always a more convenient way to make it work.

And in this case in particular, it's hard to use a typed string trigger to copy the URL without doing a lot of extra work. So this macro copies a URL if you press Shift-Control-S, but pastes the URL when you type ;;paste. Here's how it looks in action:

An animated GIF hides within


The URL won't change unless you use Shift-Control-S, you can then paste it everywhere with the typed string. However, you'll notice an issue in the animated GIF: It's not pasting a clickable link. This can be overcome, but to do so, we'll need to know what app you're pasting it into—is it a web browser, email app, something else?

Most apps—TextEdit does not seem to be one :)—should recognize the URL and magically make it clickable. But if it does not, we can probably work around it, if you let us know what app it is on the receiving end.

Here's the macro:

Download Macro(s): Save or paste a URL.kmmacros (21 KB)

Macro screenshot

Macro notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System information
  • macOS 14.4.1
  • Keyboard Maestro v11.0.2

There is some error checking in the macro: It makes sure there's a selection before you try to copy, and it makes sure that that selection is a URL, so you don't replace your URL with normal text. It also won't try to paste if the global variable is empty (and it will tell you that, so you can copy a URL).

Please let us know if you have questions on how this works.


This is my saved mailer in Mail Chimp

A picture is worth 1000 words. How murch are two pictures worth?

URL Place

Ok Question. How do I change the triggers. I will need to duplicate four times for yt for ams, pms, amc, wpmc.
for times for Rumble as RU ams, pms, amc, wpmc. my work flow on is on Thursday I put the wpmc's up on line. so will need at least two different ones then. On Fridays I put up the ams' and the pms' so that is four for that. I thought I might do ;ruams for the paste and ?ruams for the copy the URL. Same idea for the others. It looked like it works ok. I do appreciate it. Come closer to being weaned off TE.

You'd just duplicate the macro then edit the triggers for each as you see fit. And that's where you get into @Nige_S' Computers 103, because you really only need one macro that's aware of all your various needs for URLs and can act accordingly.

If I were writing this for my needs, I'd probably have the macro present me a list of choices after I copy a URL as to which one of four variables I wanted to store it in. For the insertion, I'd probably use a palette or pop-up box to pick one of the four.

But for now, get this one (or four copies of the one) working as you wish. Try it with MailChimp and see if you get formatted links or not and let us know.


I will do that when I get a chance. The idea you had about different places for them to be would be good. I know I can't get by just doing one URL in an evening. I put 6 different video mp4s up on Friday. I guess I could some how have one for YouTube that would have Four possible save points with a trigger to paste anyone of the four. The one for Rumble working the same way. And then one for Facebook.

Oh here's what else happens with the URLs. I start with TE and set my ?Vams, ?Vpms and ?Vbk descriptions.
Within those descriptions there are URL clickable links for each place I put up videos, YouTube, Rumble and Facebook. That that is nine times use there. The descriptions are formatted text. Next project. after that I start with Rumble use my Stream Deck to get me to the upload page. Drop the mp4 in. Then go to Description, if AM service I type ?(Vams) and the description is loaded with the clickable URL's in place. Then I move to Facebook same idea. Stream Deck FB load mp4 page. Drop ?(Vams) for that audience. Then move to Youtube do the same thing. Then start uploading the pms files with the description. Thursday I would have done all three with a ?(Vytbk) for YouTube, ?(Vfbbk) - FB and ?(rubk) for Rumble.

Hey, Mike - It is a good idea to read the Keyboard Maestro manual, and it's great that you have MacSparky's Field Guide.

Another learning option – a free one – that you might enjoy is my 1h15min "getting started" class, hosted on Skillshare, which is intended for non-programmers and is friendly and fun. Use this referral link for a free month of access, not just to my class but to everything on Skillshare:

Happy learning! I think you're going to really enjoy Keyboard Maestro once you get through the shift from Text Expander.