I have a simple AHK script that opens a website in my default browser (Firefox).
NumPad7::
Run, www.bbc.com
return
When I run the program outside of Firefox, it opens the website in a new tab as intended. However, when I am in Firefox and run the script, Firefox is deactivated although the website does open. If I use the hotkey an even number of times it works even when Firefox is open. I have tried using WinActivate after the command but it doesn't work.
Any idea how I can keep Firefox active?