Run a shell script without losing window focus

I have this simple macro :

However running it, makes you lose focus from the current window. Is it possible to run the script without it losing window focus?

Thank you for any help.

My guess would be not, because the system automatically focuses on the receiving application.

Can you get at the functionality in another way (eg AppleScript?).

As the last action in this macro, you could use the Activate Last Application action (KM Wiki)

This worked for me. It opened, and immediately hide, BBEdit, returning to the app I was in when I triggered the macro.