#include #include #include #include ;==================================================================================== ; Name : Multi-Trad ; Description : Lot of languages ; Author : Jbnh ; Note(s) : Really usefull ; =================================================================================== GUICreate("Multi-Trad", 370, 85) ;------------------------------------------------------------------------------------- GUICtrlCreateLabel("Entrez un mot:", 10, 10) $mot = GUICtrlCreateInput("", 85, 8, 100, 20) $trad = GUICtrlCreateCombo("Anglais >> Français", 190, 8, 170, 20) GUICtrlSetData(-1, "Français >> Anglais|Anglais >> Allemand|Allemand >> Anglais|Anglais >> Italien|Italien >> Anglais|Coréen >> Anglais|Anglais >> Espagnol|Espagnol >> Anglais|Russe >> Anglais BÊTA|Chinois (traditionnel) >> Anglais|Chinois (simplifié) >> Anglais|Anglais >> Portugais|Portugais >> Anglais|Hindi >> Anglais") ;----------------------------------------------------------------------------------- $btn0 = GUICtrlCreateButton("Traduire", 60, 50, 80) $btn1 = GUICtrlCreateButton("Faq", 145, 50, 80) $btn2 = GUICtrlCreateButton ("Annuler ", 230, 50, 80) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $btn0 If GUICtrlRead($trad) = "Anglais >> Français" Then InetGet("http://www.google.fr/dictionary?langpair=en|fr&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Français >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=fr|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Anglais >> Allemand" Then InetGet("http://www.google.fr/dictionary?langpair=en|de&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Allemand >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=de|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Anglais >> Italien" Then InetGet("http://www.google.fr/dictionary?langpair=en|it&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Italien >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=it|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Coréen >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=ko|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Anglais >> Espagnol" Then InetGet("http://www.google.fr/dictionary?langpair=en|es&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Espagnol >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=es|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Russe >> Anglais BÊTA" Then InetGet("http://www.google.fr/dictionary?langpair=ru|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Chinois (traditionnel) >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=zh-TW|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Chinois (simplifié) >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=zh-CN|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Anglais >> Portugais" Then InetGet("http://www.google.fr/dictionary?langpair=en|pt&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Portugais >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=pt|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Elseif GUICtrlRead($trad) = "Hindi >> Anglais" Then InetGet("http://www.google.fr/dictionary?langpair=hi|en&q="& GUICtrlRead($mot) & "&hl=fr&aq=f", "translate_dict", 1) Endif filemove("translate_dict", "translate_dict.txt") $file = FileOpen("translate_dict.txt", 0) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf $String = FileRead($file) $aArray1 = _StringBetween($String, '', '') _ArrayDisplay($aArray1, 'Traduction') FileClose($file) FileDelete("translate_dict.txt") Case $msg = $btn2 ExitLoop Case $msg = $btn1 $oIE = _IECreate ("http://www.autoitscript.fr/forum/viewtopic.php?f=6&t=1181") EndSelect Wend