My default browser is Safari, but sometimes I need to open the current page in Firefox instead. With Safari's Developer menu revealed, there's a built-in command:
Develop > Open Page With > Firefox
In KM, I've assigned a hotkey trigger for that command via a "Select a Menu" action.
If Firefox is already running, the task is completes successfully. But if Firefox is NOT running, Firefox launches—but the URL from Safari doesn't load. This is tricky to troubleshoot, because there's only one step: A menu command.
Thanks. No, I hadn't tried that, as I was unfamiliar with that action. I appreciate the suggestion (and will put that action to use later), but in this case, unfortunately, it behaves exactly like Select or Show a Menu Item action and loads the URL only if Firefox is already running. Otherwise, it launches Firefox, but never loads the URL.
It's as if the URL-loading sequence "times out" before Firefox launches. Put differently, the action isn't "waiting" for Firefox to launch.
Thanks for the reply. It's unclear what you're suggesting I do with an AppleScript. Save it as a separate applet? Or run it from within KM? The former would seem to defeat the purpose (executing the desired action with one command).
Thanks for this suggestion. Unfortunately, with this method, one of two things happens:
The same as before: If Firefox wasn't running, it launches, but the URL doesn't load.
If Firefox wasn't running, it now often launches with an alert, asking me to run it in "Safe Mode."
Firefox is opening in Safe Mode because you are holding the Option key down. The same thing would happen if you held the Option key down while launching FireFox with the Finder.
You are, of course, holding the Option key down because the Option key is part of your hot key trigger.
Either change your trigger to a hot key that does not include the Option key, or add a Pause Until action at the start of your macro (or just before the Activate Application/launch application action) to pause until the Modifiers are all (at least the option (⌥)) released.
Since I have a few Macs, it finally occurred to me to install Firefox on another one and try these macros there.
The good news is that each of the above methods works on Mac 2—which means the bad news is that something unidentified is preventing them from working on Mac 1.
I'm running Mojave beta on Mac 1 (only), so there's at least a possibility that something in Mojave is at fault. I can't imagine what else it might be. (For the record, I disabled all add-ons in Firefox to rule them out. No change with ALL extensions disabled.)
Under the circumstances, I'm not sure what else I can do on this Mac to troubleshoot this issue. Again, thanks to everyone who's helped so far.
Thanks. I'd gladly file a bug report with Apple, except it's unclear exactly what component of macOS I'd be reporting is (allegedly) broken, especially since the issue involves 3rd-party applications. Even if it is the fault of Mojave, it doesn't seem like we can yet specify what component of Mojave is possibly at fault. If that changes, I'll be happy to file a report.