你帮我写的这个代码要是搜索内容在后面的话就没问题 但是在中间的话就会多出一个空格
像这样的搜索串http://www.youdao.com/search?q=内容&ue=gbk&keyfrom=163index
Dim $I, $str
If $CmdLineRaw = "" Then
Exit
Else
$CmdNub = StringSplit($CmdLineRaw, " ")
Switch $cmdline[1]
Case "a"
For $I = 2 To $CmdNub[0]
$str &= $cmdline[$I] & " "
Next
ShellExecute("http://translate.google.cn/translate_t?hl=zh-CN#en|zh-CN|" & $str)
Case "b"
For $I = 2 To $CmdNub[0]
$str &= $cmdline[$I] & " "
Next
ShellExecute("http://translate.google.cn/translate_t#zh-CN|en|" & $str)
Case "c"
For $I = 2 To $CmdNub[0]
$str &= $cmdline[$I] & " "
Next
ShellExecute("http://www.youdao.com/search?q=" & $str & "&ue=gbk&keyfrom=163index")
EndSwitch
EndIf
|