如何将字符串作为转换前一个字符串的信号?

How to take a string as signal to convert a previous string?

如何在任何地方键入 WORD vv,并让浏览器打开一个包含 WORD 的 link?我知道脚本必须有

Run, browserpath www.example.com/x/y/z/WORD.html

但我不知道下一步该做什么。

我会用这样的东西:

:*:vv::
InputBox, UserInput, WORD, Enter a WORD, , 200, 120
if not ErrorLevel
{
    ; remove first and last white spaces
    UserInput := trim(UserInput)
    ; replace all middle white spaces with +
    UserInput := StrReplace(UserInput, A_Space , "+", UserInput)
    Run, "browserpath" "www.example.com/x/y/z/%UserInput%.html"     
}
return

示例:

; google with the default browser    
Run, https://www.google.com/search?hl=en&q=%UserInput%

; google images with IE    
Run, iexplore.exe "https://images.google.com/images?hl=en&@@"

; google autohotkey with another browser    
Run, "browserpath" "https://www.google.com/search?sitesearch=ahkscript.org&q=%UserInput%"

; autohotkey.com
https://www.autohotkey.com/search/search.php?query_string=%UserInput%

; autohotkey manual    
https://www.google.com/search?sitesearch=ahkscript.org&q=%UserInput%

; wikipedia    
https://en.wikipedia.org/wiki/Special:Search?search=%UserInput%&go=Go