Different Ways to Launch Applications

I bot KM to accomplish one thing: I wish to use F1, F2, F3 to launch programs and move between programs. Peter Lewis showed me how to set this up, and I did so by the ACTIVATE A SPECIFIC APPLICATION item. The problem is that the result is not identical with clicking on the program icon on the dock. If, say, Safari has all windows closed and I launch using F3, then it shows up with no open windows. I used to use Automator for this (and QuicKeys before that), and it would launch the program as if the dock icon was clicked. That is not what ACTIVATE A SPECIFIC APPLICATION is doing. Is there a way to make F3 launch Safari so that a new window is opened: ie, launch it in the way it would be launched if one clicked on the dock icon? Many thanks for any advice.

Is this what you are talking about? Hit F3 and no matter what existed, in Safari, before or is minimized will just activate Safari with a new page? Let me know if I misunderstood because, through Safari Preferences, I have mine set up to do different actions.

I will try what you suggest. Thanks. To be clearer: If SAFARI has some windows open already then my F3 works fine. But if SAFARI has no windows open, then it launches with no windows open, when I would want it to launch with a NEW window (my default home page). What you have above is a 2-step process: Activate, Then open New window. Well, that is not EXACTLY what my F3 did before. If I had a window already open, then I don't need the New window. But getting the New window would be ok as it would allow me to insert a URL without the extra step of having to open a window.

Now, I use Mathematica constantly. When I flip from SAFARI into Mathematica I would NOT want it to open a new window (as they would pile up) if some window was already open. But if nothing open, then sure, a new window is fine.

Anyway, thanks for comments which look very helpful.

One approach is to look for some menu item that is disabled when there are no existing Safari windows and if that's the case have Keyboard Maestro open a new window.


Thanks NaOH and kcwChat. I tried the first solution and it appears to do what I want, but I appreciate the extra info in the second.

I implemented the NaOH solution and it works very smoothly. Thanks.