bob 发表于 2010-12-25 17:25 http://www.autoitx.com/images/common/back.gif
谢谢分享....... 源码已收下了 程序有点年代了.谷也改版了 谢谢。已经用上了 感谢9楼,学习了 回复 9# bob
更改翻译函数为以下内容:
Func _translate()
$xmlhttp = ObjCreate("Msxml2.XMLHTTP");
If $flag=1 Then
$xmlhttp.open("GET", "http://translate.google.cn/translate_a/t?client=t&sl=zh-CN&tl=en&hl=zh-CN&sc=2&ie=UTF-8&oe=UTF-8&prev=btn&ssel=3&tsel=6&q=" & _UnicodeURLEncode(GUICtrlRead($Edit1)) , False)
$xmlhttp.Send
$result = StringSplit($xmlhttp.responseText, ',')
If($result<>0) Then
GUICtrlSetData($Edit2, "翻译结果:"&StringTrimRight(StringTrimLeft($result, 4),1)&@CRLF&"注音:"&StringTrimLeft(StringTrimRight($result, 3),1))
EndIf
Else
$xmlhttp.open("GET", "http://translate.google.cn/translate_a/t?client=t&sl=en&tl=zh-CN&hl=zh-CN&sc=2&ie=UTF-8&oe=UTF-8&prev=btn&ssel=4&tsel=6&q="& _UnicodeURLEncode(GUICtrlRead($Edit1)), False)
$xmlhttp.Send
$result = StringSplit($xmlhttp.responseText, ',')
If($result<>0) Then
GUICtrlSetData($Edit2, "翻译结果:"&StringTrimRight(StringTrimLeft($result, 4),1)&@CRLF&"注音:"&StringTrimLeft(StringTrimRight($result, 1),1))
EndIf
EndIf
EndFunc ;==>_translate
回复标记一下,很强大 看著不錯,謝謝樓主分享。 很好很强大,谢谢分享。。。。。
页:
1
[2]