Problem Opening Firefox

Hi all,

on High Sierra (latest update)

Currently I am having a problem attempting to open Firefox from a key command.

using : Open specific application - then I chose Firefox (latest version) from the other menu to specifically target that application.

  • What happens is Firefox has a problem opening and says that I should start in safe mode or I should refresh Firefox - which wants to create a new profile which I do not want.

  • so I tried several things including running the app Cocktail and rebuilding the various databases:

  • rebuild launch services and help and 'what is' and locate databases

  • then I deleted Firefox and its profiles rebooted the whole computer and reinstalled Firefox fresh - and opened it one time then quit.

  • next I rebuilt the key command from scratch

  • same problem - again it wants to start in safe mode or rebuild the profile

Q: How can I fix this and get Firefox to open with problems

Also - my original need was to copy the current safari url to Firefox

  • copy the current URL in Safari
  • open Firefox
  • create new page
  • paste in the url

In the past I had done this with AppleScript. Now I am curious if this can be dome this just KM scripting?

Like I can set a var to the %safariURL%
But How can I paste it in the firefox new page?


To past it in Firefox try something like:
– Activate Firefox
– Keystroke CMD+T (new tab)
– "Set Front Browser URL" to that var

Hi - Thanks for the help. This is a cool idea.

When I tried these steps with Safari to Chrome - they worked great.

Problem is When I tried with Safari to Firefox - it got to the step
– Activate Firefox
– Keystroke CMD+T (new tab)

but then
– "Set Front Browser URL" to that var : for unknown reason ended up back in safari and pasting and new tab with the Var - not in Firefox.

Can you post a screenshot of you macro? I haven't had any issues getting info from Safari and opening it on Firefox.

Sounds to me the culprit is on how you are trying to launch Firefox. Try what @Julian_Steinmann mentions "Activate a Specific Application" instead of "Open a File, Folder or Application".

Also, I do not think "Set Front Browser URL" will work with Firefox, you need to simulate keystrokes instead.

I actually never really used the "Front browser controls" usually I did similar things all with shortcuts.
So you could do:
– keystroke: CMD + L (selects address bar)
– then past var

I have a couple of cases when I need to go back and forth between Safari and Firefox, so to save me headaches I created a couple of macros to open new tabs on Safari or Firefox and then I call them setting a variable before. Let me see if I can create an example and share it here.

It's pretty simple. Have a look at the below

Safari pass URL to Firefox.kmmacros (17.1 KB)

Oh the CMD+T was still missing in the example above. If you want to have it in a new tab you got to add that after Activate Firefox

By the way, just because I'm curious why are you using two different browsers?


Thanks to both of you for all the help! Julian you beat me to it!

So Cool - Thanks - (I was having issues with Firefox...) Now All Good!

I did add a bit extra to it: first I copy the clipboard to a var then at the end I set the clipboard back the var

Thanks for all the help!

In my case, I use Safari as my main browser, but I do web development on Firefox.

I copy the clipboard to a var then at the end I set the clipboard back the var

The same result, but maybe a bit cleaner version would be using "Delete current clipboard" with parameter "0". That deletes the last clipboard.

A bit more complex, but here I have some basic browser switcher with reusable macros.

Switch Browsers Macros.kmmacros (17.3 KB)

All required macros are included in the folder Switch Browsers.

Ah, yes of course that makes sense.
That actually could be a nice thing to test cross-browser. So that with one shortcode the site gets opened in chrome, safary & firefox and the windows arranged next to each other on the screen.

Wow - Thanks so much - These are GREAT!!! BYE BYE AppleScript! (what I used to use for this)

By the way, I just found an issue with my macro, fixing it right now.

Here is the updated version.

Switch Browsers Macros v1.0.1.kmmacros (17.4 KB)

I guess while I am at it: I have been using Firefox Developer version and I also would like to have regular Firefox on same machine.... Earlier I was having issues trying to use both (as described above)

  • do you think it's safe to go between both with KM (different scripts of course)?

As far as you are able to target each one with KM I do not see a problem.

Btw, I've been able to use Firefox Developer Edition next to regular Firefox without a problem.