i've got a simple question and maybe there is an elegant solution to it.
I've bound different keybinds to open an URL in my browser. In this example Firefox, or the default browser if i just use:
Run, http://myurlhere.com
It looks like this:
However some of this websites have e.g. a search box which is selected upon loading the site. A good example would be Google, if you go to Google the search field has the cursor in it.^MButton::
Run, C:\Program Files (x86)\Mozilla Firefox\firefox.exe -url http://myurlhere.com/
return
When i press in my example above CTRL+MiddleMouseButton the browser opens the website in a new tab but also i also lose focus on the website. This means that i have to click on my browser window to start typing. When i press the keybind a second time it works and i have the website in a new tab + focus on the browser window. This then goes back and forth if i press it multiple times.
I don't really understand why this is the case and i tried different solutions with different AHK commands.
Anyone any idea on how to tell my AHK script to focus the window again?
BR