如何在后台选项卡中打开脚本中的 URL?

How can I open the URL in my script in a background tab?

所以我有这个代码:

f9:: 
Send, ^c
Run, msedge.exe http://www.google.com/search?q="%clipboard%"
return 

我想制作此脚本的一个版本,其中 URL 在后台选项卡中打开。

或许看看运行的帮助如下:https://www.autohotkey.com/docs/commands/Run.htm

FROM THE HELP (this is not the code, but only explanation):
Syntax: Run, Target , WorkingDir, Options, OutputVarPID
Parameters: Options
Min: launch minimized or Hide: launch hidden

因此您的代码(无论如何就是那一行)将是:

Run, msedge.exe http://www.google.com/search?q="%clipboard%", , Min

应该就可以了!但如果它没有(有些 windows 不响应这些选项),那么稍等一下并最小化 window 如下:

Run, msedge.exe http://www.google.com/search?q="%clipboard%", , Hide
Sleep, 3000 ; timing in ms so 3 seconds is probably more than you need
WinMinimize, %clipboard% ; since the window title will include it

享受,