"Open a File, Folder, Application" not accepting variable?

Shouldn’t I be able to use “%Variable%myFileName%” with “Open a File, Folder, Application”? I found in the forums this was done…

But what I’m getting is “Macro Cancelled / Open File failed w/nonexistent path ‘%Variable%myFileName%’…”

If I had hair I’d be pulling it out :slight_smile:

[by the way: couple spelling corrections: “canceled” (unless you’re Anglican) and “nonexistent” :wink: ]

It sounds like your variable hasn’t been properly set to a file path, but without seeing your full macro, I can only speculate as to whether or not that’s the case. If you can share your full macro here (along with, ideally, what it is you’re trying to accomplish with it) we should be much better able to assist you.

1 Like

Look in your Keyboard Maestro Preferences, Variables and find the variable and see what it's value is. It must be a full path.

I am Australian, so "cancelled" is correct. "existant" is misspelled though, fixed for some future version.

2 Likes

This is the last straw. Now we need localization! :wink:

3 Likes

My problem is that I spell it both ways at different times.
Plus my US Mac Dictionary allows both, so my spell checker doesn't catch it.

I do think I like the two "ll" better.

Hey Aaron,

Your variable name suggests you're using a name rather than a path.

Here's an example that should work on your system out-of-the-box:

Keyboard Maestro “Open Folder Given a Path” Macro

Open Folder Given a Path.kmmacros (1.6 KB)

Keyboard Maestro understands tilde-based paths, and they DON'T need to be quoted or escaped if there are spaces in them. (True with full POSIX Paths as well.)

However – if your variable ends up going to the shell or something else that won't understand tilde-notation then you need to use Filter Variable action to Expand Tilde in Path.

This form won't be misunderstood by any app, and it's easier to quote if it has spaces in it – Keyboard Maestro doesn't need the quoting – but you may pass it to something that does.

-Chris

2 Likes

Hi all,

I hadn’t programmatically added the extension to my filename :stuck_out_tongue:

But it was confusing that the error message gave the text that comprised the variable name instead of the contents of the variable–led me to believe that it was seeing what I typed in the text box as the literal filename. That was supported by the fact that there isn’t a dropdown for variables beside the text box, and made debugging from the error message harder. So recommend the error message show what it was trying to open :slight_smile:

Thanks all for the help (and the education about Australian spelling :wink: )!

The problem with using the expanded text is what if the variable is completely wrong (or otherwise), then the text might be empty which is even more confusing. Plus you cannot find the offending action by searching for the resulting text.

Considering that Australian English is the mother of all modern-day English you should give adequate focus to the Australian spelling.

@Tom, what is the source of your chart?

It seems that Wikipedia disagrees:
English language - Wikipedia

English began to rise in prestige during the reign of Henry V. Around 1430, the Court of Chancery in Westminster began using English in its official documents, and a new standard form of Middle English, known as Chancery Standard, developed from the dialects of London and the East Midlands. In 1476, William Caxton introduced the printing press to England and began publishing the first printed books in London, expanding the influence of this form of English.[44]

In the 1611 King James Version of the Bible, written in Early Modern English, Matthew 8:20 says:
The Foxes haue holes and the birds of the ayre haue nests[35]

Spread of Modern English

By the late 18th century, the British Empire had facilitated the spread of English through its colonies and geopolitical dominance. Commerce, science and technology, diplomacy, art, and formal education all contributed to English becoming the first truly global language. English also facilitated worldwide international communication.[46][47] As England continued to form new colonies, these in turn became independent and developed their own norms for how to speak and write the language. English was adopted in North America, India, parts of Africa, Australasia, and many other regions.

I apologize to the OP, as this is way off-topic.
Should I move this discussion about English to a new topic?

Ehm, I hope your question isn’t serious :wink:

Sorry, my sarcasm detector was off-line. :wink:
But then, you could have given me a clue, like a wink or something. :wink:

I've found that humor doesn't travel very well these days online, unless there is some overt indication of it. I just witnessed a big blowup in another forum because several people missed the humor of the first poster. :smile:

Do you by any chance remember a late night comedian of yesteryear by the name of Dick Cavett? He had a very dry wit, which most people didn't get, so his show didn't last.
But I thought he was hilarious.

Oh? I don't know about that...

ABC This Morning/The Dick Cavett Show ABC Daytime March 1968-January 1969
The Dick Cavett Show ABC Primetime May 1969-September 1969
The Dick Cavett Show ABC Late Night December 1969-January 1975
The Dick Cavett Show PBS Late Night October 1977-October 1982
The Dick Cavett Show USA Network September 1985-September 1986
The Dick Cavett Show ABC Late Night September-December 1986
The Dick Cavett Show CNBC Primetime April 1989-January 1996

Good point. I forget that there is always at least one elephant in the room. :wink:[quote="ccstone, post:13, topic:7042"]
The Dick Cavett Show ABC Late Night December 1969-January 1975
[/quote]

This is the show I was referring to. 5 years isn't bad.

So I take it you were a fan?

Okay, makes sense :slight_smile:

You Bet. Someone with a bonafide 3-digit IQ was on TV for once...

Tom Snyder, Bill Moyers, and Charlie Rose as well.

-Chris

1 Like

Actually, I now realize what would really be helpful: clicking the error notification bringing up Keyboard Maestro at the step where the error happened, optionally in debug mode! This would decrease the need to go in and out of debug mode and set break points.

Even moreso, it would decrease the most painful experience of using KM, which is having to search for a macro to edit. This happens not only when tracking down a bug, but also when trying to get to the macro you just ran, and, of course, a macro called by another macro :).

You would probably want there to be an option so that this could be turned on or off, but when turned on this would be extremely helpful!

On this same topic: would appreciate ability to set hotkeys for back and forward (preferably Cmd+[ and Cmd+], even though they’re already used). I know I can do it myself but hesitate to make KM search for a graphic just to go back/forward :slight_smile: [and I don’t have UI Browser :P]

Hey Aaron,

See these two posts:

Select the previously edited macro

Select the next edited macro

And examine the rest of the thread.

-Chris

Unfortunately, the API for Notifications makes dealing with this very difficult - you cannot create different kinds of notifications within a single application (unless you're Apple anyway). It may be possible, but every time I've tried to do anything with notifications it has failed. Also, actions don't have UIDs so they are hard to target.

There are several popup menus in the top of the editor that let you select recently edited or triggered macros.

Also, any time you select a macro to trigger (eg in a menu or palette), if you hold down the Option key it will edit the macro instead.