Weird behavior when typing path

Yes, but ordinarily you wouldn't do this manually; if a variable needs to be deleted, you'd do it as part of a macro. Often the beginning or end of a macro is when you'll want to clear variables.

To keep things manageable, try to use local variables if you don't need them outside of the running macro. That's usually enough to keep things tidy-ish.

I've always done it like this as it's a convention I noticed other more experienced users had adopted. I think it's just for visual clarity.

Ahh, I get you. Personally, I almost always use this before setting the filename, so it didn't occur to me that you might want to set that first.

Absolutely. However, sometimes you have to go a different route. As I said before, โ‡งโŒ˜G doesn't work well for me, so I prefer to adapt my macro to be more reliable, at the expense of brevity.

Navigation in dialogs can be fickle, so you just have to experiment. Personally, I wouldn't mess around with the global keystroke delay, because most of the time, you won't want it to take any longer than necessary; it's only when there's an issue like this that you have to account for it.

I believe so, but I've never tried.

Yes, perfect example. That's really the only time I ever feel the need to delete variables. They're usually either local or I'm happy to let them persist as global.

But you are actually putting in an extra step! You know the file name you want to use. You know the path you want to save to. When the Save/Save As dialog opens and the filename is fully selected (the default state in most apps), simply type/paste "/Users/danny/Desktop/testFile.html", then hit "OK" to save it as testFile.html on the Desktop of the user Danny (assuming you have write permission, obvs!).

But that's not very portable -- we always want to save to the Desktop and with a certain name, but which user will be running this script? That's where you'd use ~/Desktop/testFile.html instead.

Using Cmd-Shift-G is more like simulating what a user would actually do -- name the file and then choose where to save it. KM can go a step beyond when it knows both name and location, and do it all in one go. But there are many ways to skin this particular cat, so pick whatever reliably works for you.