Project Google Übersetzer Gui v.(22.04.20)

Veröffentliche deine funktionierenden Skripte und Funktionen

Moderator: jNizM

UnReALiTyy
Posts: 166
Joined: 06 Jun 2017, 11:38

Project Google Übersetzer Gui v.(22.04.20)

08 Mar 2020, 18:55

danke an:
teadrinker wrote:für dein übersetzer (zeile: 337) und mp3 (zeile: 458) skript
tmplinshi wrote:für dein AutoXYWH (zeile: 20 oder 502) skript und die idee wie man die größe speichern kann (privat posteingang)
rommmcek wrote:für das modifizieren das die eingabesprache als wert zurückgegeben wird (zeile: 343, 367)
malcev wrote: für das hinzufügen des Spam Schutz beim übersetzer Skript (zeile: 369)
-------------------------------------------------------------------------------------
@UnReALiTyy fügte eine GUI hinzu mit einem eingabe und ausgabe feld, (Knöpfe: ein zum verschieben des textes, ein zum übersetzen des eingetragenen textes, ein zum kopieren des textes rechts und fürs linke feld, ein zum leeren der felder, ein um Alwaysontop an und auszuschalten, einen um den text im browser zu öffnen, einen um die orginal gui größe wiederherzustellen, einen um eine text datei zu öffnen, einen um den übersetzten text zu speichern, einen um die neue gui größe zu speichern, einen um die gespeicherte gui größe zu laden, einen um die übersetzung als mp3 zu speichern, eine dropdownliste die die erkannte sprache zeigt), einen text datei mit drag and drop öffnen, speichern und laden der button und der gui größe und position, zeigt text wenn die maus über button ist, markierten oder kopierten text übersetzen, übersetze seiten beim kopieren des links, ändern der Gui größe durch ziehen
Image
-------------------------------------------------------------------------------------
Ich hoffe ich habe jeden erwähnt, wenn ich jemand vergessen habe dann tut mir das leid, bin schon lange am basteln von diesem Skript.
Wer Bugs findet oder Ideen zum hinzufügen hat, ich bin für alles offen und Dankbar.

Code: Select all

/*===================================================================================
thanks to:
@garry the idea with a gui (https://www.autohotkey.com/boards/viewtopic.php?f=9&t=67721#p291156)
@teadrinker for your translator (line: 337) and mp3 (line: 458) script
@tmplinshi for your AutoXYWH (line: 20 or 502) script and the idea how to save the size (private inbox)
@rommmcek for modifying that the input language is returned as a value (line: 343, 367)
@malcev for adding spam protection to the translator script (zeile: 369)
-------------------------------------------------------------------------------------
@UnReALiTyy added a gui with an input and output field, (buttons: one to move the text, one to translate the entered text, one to copy the text on the right and for the left field, one to empty the fields, one to switch Alwaysontop on and off, one to open the text in the browser, one to restore the original gui size, one to open a text file, one to save the translated text, one to save the new gui size, one to load the saved gui size , one to save the translation as mp3, a dropdown list showing the Detected language), open a text file with drag and drop, save and load the button and the gui size and position, shows text when the mouse is over button, translate selected or copied text, Translate pages when copying the link, change the gui size by dragging
===================================================================================
*/
#SingleInstance, force
#KeyHistory 0
#NoEnv
SetBatchLines, -1
SetWinDelay, -1
ListLines, Off
SendMode, Input
SetTitleMatchMode, 2
;#Include %A_ScriptDir%\AutoXYWH.ahk		;that or line 502

;↓Use these lines in another script.↓
;#Include %A_ScriptDir%\translator.ahk
Critical
	global tl1
gosub, language
return
;===================================================================================
guiWeb:
	link := StrReplace(clipboard, "%")
	link := StrReplace(link, ":", "%3A")
	link := StrReplace(link, "/", "%2F")
	link := StrReplace(link, "?", "%3F")
	link := StrReplace(link, "=", "%3D")
	link := StrReplace(link, "&", "%26")
	link := StrReplace(link, "#", "%23")
	link := StrReplace(link, " ", "%20")
	link := StrReplace(link, "`n", "%0A")
	open .= StrReplace(link, """")
clipboard := safe
Run, % open
	WinWaitClose, Google
		WinWait, Google
	WinActivate
guiEscape:
guiClose:
Settimer, savedXY, off
ToolTip
2guiClose:
2guiEscape:
Gui, Destroy
exit

savedXY:
WinGetPos, savedX, savedY,,, ahk_class AutoHotkeyGUI
return

GuiDropFiles:
Loop, Parse, A_GuiEvent, `n
    file := A_LoopField
gosub readfile
;===================================================================================
F3::
Critical
safe := clipboard, btn6 := 0
Send ^{c}
	Sleep, 50
		gosub, url
ToolTip
	Gui, 1:new, +AlwaysOnTop +Resize +Minsize630x275
	Gui, Add, StatusBar, vsb, `r   ↑Text Copy or Write, Open or Drop a File.↑%A_Tab%%A_Tab%v.(22.04.20) by UnReALiTyy     
		Gui, Add, DDL, w100 x%dd1X% y17 vlist1 gDDL1, %e5x%
		Gui, Add, DDL, w100 x%dd2X% y27 vlist2 gDDL2, %e5x%
				Gui, Add, Button, x%b1X% y2 vbtn1 gb1, <Move>
				Gui, Add, Button, x%b2X% y16 vbtn2 gb2 Default, Translate
				Gui, Add, Button, x%b3X% y26 vbtn3 gb3, ↓Copy
				Gui, Add, Button, x%b4X% y26 vbtn4 gb4, Copy↓
				Gui, Add, Button, x%b5X% y26 vbtn5 gb5, ↓Clear↓
				Gui, Add, Button, x%b6X% y2 vbtn6 gb6 Default, Top
				Gui, Add, Button, x%b7X% y2 vbtn7 gb7, ↓Web
				Gui, Add, Button, x%b8X% y2 vbtn8 gb8, Restore
				Gui, Add, Button, x%b9X% y2 vbtn9 gb9, Open
				Gui, Add, Button, x%b10X% y2 vbtn10 gb10, Save
				Gui, Add, Button, x%b11X% y2 vbtn11 gb11, New
				Gui, Add, Button, x%b12X% y2 vbtn12 gb12, Load
				Gui, Add, Button, x%b13X% y2 vbtn13 gb13, MP3
		Gui, Add, Edit, vedt1 w%edtW% h%edtH% x10 y50 +Limit65535 +WantTab, % clipboard
		Gui, Add, Edit, vedt2 w%edtW% h%edtH% x%edtX% y50 +WantTab
			GuiControl, Focus, Translate
			GuiControl, Choose, list1, % tl1
			gosub, b2
	Gui, 1:Show, w%savedW% h%savedH% x%savedX% y%savedY%, Translate to %tl1%
OnMessage(0x200, "WM_MOUSEMOVE")
Settimer, savedXY, 200
clipboard := safe
return
;===================================================================================
b1:	;Move
b3:	;Copy Left
b4:	;Copy Right
Gui, Submit, nohide
	if (A_Thislabel = "b1") {
		GuiControl, Text, edt1, % edt2
		GuiControl, Choose, list1, % list2
		gosub, DDL1
		}
	if (A_Thislabel = "b3")
		clipboard := edt1
	if (A_Thislabel = "b4")
		clipboard := edt2
return

DDL1: ;DropDownList1
Gui, Submit, nohide
	tl1 := SubStr(list1,1,2)
		WinSetTitle, ahk_class AutoHotkeyGUI,, Translate to %tl1%
	IniWrite, %tl1%, %rssini%, Lang, key
;return		;disables translating when selecting a language from the drodownlist

b2:	;Translate
DDL2: ;DropDownList2
Gui, Submit, nohide
gosub, Gui2
	Loop, 3 {
		if (A_Thislabel = "DDL1") or (A_Thislabel = "b2") {
			GuiControl, 1:Text, edt2, % (trl := GoogleTranslate(edt1)).1
			GuiControl, 1:Choose, list2, % trl.2
			}
		if (A_Thislabel = "DDL2")
			GuiControl, 1:Text, edt2, % (trl := GoogleTranslate(edt1, SubStr(list2,1,2))).1
		if (trl.1)
			break
	}
Gui, 2:Destroy
if (trl.1)
	return
Msgbox, 262192, 3 attempts Failed!, Error translating the text, try again or change the text!
reload
exit

b5:	;Clear
GuiControl, Text, edt2
GuiControl, Text, edt1
return

b6:	;Top
Winset, Alwaysontop, Toggle, ahk_class AutoHotkeyGUI
if (!btn6) {
	GuiControl, -Default, Top
	btn6 := 1
}
else {
	GuiControl, +Default, Top
	btn6 := 0
}
return

b7:	;Web
url:
if (SubStr(clipboard,1,4) = "http") or (SubStr(clipboard,1,4) = "www.") {
		open = https://translate.google.com/translate?sl=auto&tl=%tl1%&u=
	gosub, guiWeb
}
else if (A_ThisLabel = "b7") {
	Gui, Submit, nohide
		clipboard := edt1
		open = https://translate.google.com/#view=home&op=translate&sl=auto&tl=%tl1%&text=
	gosub, guiWeb
}
return

b8:	;Restore
Gui, 1:Show, w630 h275 x635 y375, Translate to %tl1%
return

b9:	;Open
Gui +OwnDialogs
FileSelectFile, file, 3,, Select file, Text documents (*.txt)
if (!file)
	return
readfile:
FileRead, text, %file%
GuiControl,, edt1, %text%
exit

b10: ;Save
Gui +OwnDialogs
FileSelectFile, file, S16,, Save file, Text documents (*.txt)
if (!file)
	return
if !InStr(file, ".txt")
	file .= .txt
if FileExist(file)
	FileDelete %file%	
Gui, Submit, nohide
FileAppend, %edt2%, %file%
return

b11: ;New
IniWrite, %savedW%, %rssini%, Gui, W
IniWrite, %savedH%, %rssini%, Gui, H
IniWrite, %savedX%, %rssini%, Gui, X
IniWrite, %savedY%, %rssini%, Gui, Y
	ControlGetPos, edtX,, edtW, edtH, Edit2
		IniWrite, %edtW%, %rssini%, Edit, W
		IniWrite, %edtH%, %rssini%, Edit, H
		IniWrite, % edtX - 8, %rssini%, Edit, X
Loop, 13 {
ControlGetPos, b%A_Index%X,,,, Button%A_Index%
	IniWrite, % b%A_Index%X - 8, %rssini%, Buttons, xb%A_Index%
}
Loop, 2 {
ControlGetPos, list%A_Index%X,,,, ComboBox%A_Index%
	IniWrite, % list%A_Index%X - 8, %rssini%, DropDownList, xDDL%A_Index%
}
return

b12: ;Load
Settimer, savedXY, off
IniRead, savedW, %rssini%, Gui, W
IniRead, savedH, %rssini%, Gui, H
IniRead, savedX, %rssini%, Gui, X
IniRead, savedY, %rssini%, Gui, Y
Gui, 1:Show, w%savedW% h%savedH% x%savedX% y%savedY%, Translate to %tl1%
Settimer, savedXY, 200
return

b13: ;MP3
Gui +OwnDialogs
FileSelectFile, file, S16,, Save file, Audio (*.mp3)
if (!file)
	return
if !InStr(file, ".mp3")
	file .= .mp3
if FileExist(file)
	FileDelete %file%
Gui, Submit, nohide
GetAudioFromGoogle(edt2, tl1, file)
return
;===================================================================================
language:
e5x = af_Afrikaans|sq_Albania|am_Amharic|ar_Arabic|hy_Armenian|az_Azerbaijani|eu_Basque|bn_Bengalese|my_Burmese|bs_Bosnian|bg_Bulgarian|ceb_Cebuano|ny_Chichewa|zh-CN_Chinese|de_German|da_Danish|en_English|eo_Esperanto|et_Estonia|tl_Filipino|fi_Finnish|fr_French|fy_Friesian|gl_Galician|ka_Georgian|el_Greek|gu_Gujarati|ht_Haitian|ha_Hausa|haw_Hawaiian|iw_Hebrew|hi_Hindi|hmn_Hmong|ig_Igbo|id_Indonesian|ga_Irish|is_Icelandic|it_Italian|ja_Japanese|jw_Javanese|yi_Yiddish|kn_Kannada|kk_Kazakh|ca_Catalan|km_Khmer|rw_kinyarwanda|ky_Kyrgyz|ko_Korean|co_Corsican|hr_Croatian|ku_Kurdish|lo_Lao|la_Latin|lv_Latvian|lt_Lithuanian|lb_Luxembourgish|mg_Malagasy|ml_Malayalam|ms_Malaysian|mt_Maltese|mi_Maori|mr_Marathi|mk_Macedonian|mn_Mongolian|ne_Nepalese|nl_Dutch|no_Norwegian|or_Odia|ps_Pashto|fa_Persian|pl_Polish|pt_Portuguese|pa_Punjabi|ro_Romanian|ru_Russian|sm_Samoan|gd_Scottish|sv_Schedisch|sr_Serbian|st_Sesotho|sn_Shona|sd_Sindhi|si_Singhalese|sk_Slovak|sl_Slovenia|so_Somalia|es_Spanish|sw_Swahili|su_Sundanese|tg_Tajik|ta_Tamil|tt_Tatar|te_Telugu|th_Thai|cs_Czech|tr_Turkish|tk_Turkmen|ug_Uighur|uk_Ukrainian|hu_Hungarian|ur_Urdu|uz_Uzbek|vi_Vietnamese|cy_Welsh|be_Belarusian|xh_Xhosa|yo_Yoruba|zu_Zulu

btn1_TT := "Move right field to the left"
btn2_TT := "Translate left field"
btn3_TT := "Copy left field"
btn4_TT := "Copy right field"
btn5_TT := "Clear fields"
btn6_TT := "Gui lock/unlock"
btn7_TT := "View in browser"
btn8_TT := "Restore size"
btn9_TT := "Open a text file"
btn10_TT := "Save the translation"
btn11_TT := "Save new size"
btn12_TT := "Load saved size"
btn13_TT := "Save as mp3"
list1_TT := "Select a language"
list2_TT := "Detected language"

	rssini = %a_scriptdir%\lib\Translator.ini
if !FileExist(rssini) {
	FileAppend, [Lang]`nkey=de`n===========`n[Gui]`nW=630`nH=275`nX=635`nY=375`n===========`n[Edit]`nW=300`nH=200`nX=320`n===========`n[Buttons]`nxb1=288`nxb2=490`nxb3=10`nxb4=580`nxb5=290`nxb6=591`nxb7=10`nxb8=60`nxb9=200`nxb10=240`nxb11=110`nxb12=145`nxb13=555`n===========`n[DropDownList]`nxDDL1=380`nxDDL2=110, %rssini%
Loop {
    Progress, %A_Index%,, % "Install..."A_Index "%", Installation is in progress
    Sleep, 1
    if (A_Index = 100)
        break
}
Progress, Off
Msgbox, 262192, file created!, The file "Translator.ini" was created in ["%a_scriptdir%\lib"]`n`nMark or copy text you want to translate and press the F3 key.
}
	IniRead, tl1, %rssini%, Lang, key
IniRead, savedW, %rssini%, Gui, W
IniRead, savedH, %rssini%, Gui, H
IniRead, savedX, %rssini%, Gui, X
IniRead, savedY, %rssini%, Gui, Y
	IniRead, edtW, %rssini%, Edit, W
	IniRead, edtH, %rssini%, Edit, H
	IniRead, edtX, %rssini%, Edit, X
Loop, 13
	IniRead, b%A_Index%X, %rssini%, Buttons, xb%A_Index%
Loop, 2
	IniRead, dd%A_Index%X, %rssini%, DropDownList, xDDL%A_Index%
return
;===================================================================================
GuiSize:
	if (A_EventInfo = 1) {
		Settimer, savedXY, off
			WinWaitActive, ahk_class AutoHotkeyGUI
			Settimer, savedXY, 200
		return
		}

    AutoXYWH("w0.5h", "edt1")
    AutoXYWH("x0.5w0.5h", "edt2")

	AutoXYWH("x0.5", "btn1", "btn5")
	AutoXYWH("x0.75", "btn2")
	AutoXYWH("x", "btn4", "btn6", "btn13")
	AutoXYWH("x0", "btn3", "btn7")
	AutoXYWH("x0.35", "btn9", "btn10")
	AutoXYWH("x0.15", "btn8", "btn11", "btn12")

	AutoXYWH("x0.75", "list1")
	AutoXYWH("x0.25", "list2")

	savedW := A_GuiWidth
	savedH := A_GuiHeight

Settimer, Redraw, -50
return

Redraw:
WinSet, Redraw,, ahk_class AutoHotkeyGUI
return

WM_MOUSEMOVE() {
    static CurrControl, PrevControl, _TT
    CurrControl := A_GuiControl
    if (CurrControl != PrevControl)
        ToolTip % %CurrControl%_TT
        PrevControl := CurrControl   
}

control:
if StrLen(clipboard) > 65535 {
	Msgbox, 262192, Error !, The copied text is too long!`nReduce the number of characters.`nAnd then try again.
	reload
	return
}
Gui2:
	Gui, 2:New, +Toolwindow +AlwaysOnTop
	Gui, Add, Text,, Translation is in progress!
	Gui, Show, AutoSize, Please wait
return
;===================================================================================
;https://www.autohotkey.com/boards/viewtopic.php?f=6&t=63835

GoogleTranslate(str, from := "auto", to := "0")  {
   static JS := CreateScriptObj(), _ := JS.( GetJScript() ) := JS.("delete ActiveXObject; delete GetObject;")
   
   json := SendRequest(JS, str, to, from, proxy := "")
	oJSON := JS.("(" . json . ")"), lng := oJSON[2] 	;modified by @rommmcek

   if !IsObject(oJSON[1])  {
      Loop % oJSON[0].length
         trans .= oJSON[0][A_Index - 1][0]
   }
   else  {
      MainTransText := oJSON[0][0][0]
      Loop % oJSON[1].length  {
         trans .= "`n+"
         obj := oJSON[1][A_Index-1][1]
         Loop % obj.length  {
            txt := obj[A_Index - 1]
            trans .= (MainTransText = txt ? "" : "`n" txt)
         }
      }
   }
   if !IsObject(oJSON[1])
      MainTransText := trans := Trim(trans, ",+`n ")
   else
      trans := MainTransText . "`n+`n" . Trim(trans, ",+`n ")

   from := oJSON[2]
   trans := Trim(trans, ",+`n ")
return [trans, lng] 	;modified by @rommmcek
}
;https://www.autohotkey.com/boards/viewtopic.php?f=6&t=63835&p=320080#p319790

SendRequest(JS, str, tl, sl, proxy) {
   static http
   ComObjError(false)
   loop
   {
      if !http
      {
         http := ComObjCreate("WinHttp.WinHttpRequest.5.1")
         ( proxy && http.SetProxy(2, proxy) )
         http.open( "get", "https://translate.google.com", 1 )
         http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
         http.send()
         http.WaitForResponse(-1)
      }
      http.open( "POST", "https://translate.google.com/translate_a/single?client=webapp&sl="
         . sl . "&tl=" . tl1 . "&hl=" . tl1
         . "&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&ie=UTF-8&oe=UTF-8&otf=0&ssel=0&tsel=0&pc=1&kc=1"
         . "&tk=" . JS.("tk").(str), 1 )

      http.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=utf-8")
      http.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0")
      http.send("q=" . URIEncode(str))
      http.WaitForResponse(-1)
      if !InStr(http.responsetext, "<form id=""captcha-form""")
         break
      http := ""
   }
   return http.responsetext
}

URIEncode(str, encoding := "UTF-8")  {
   VarSetCapacity(var, StrPut(str, encoding))
   StrPut(str, &var, encoding)

   While code := NumGet(Var, A_Index - 1, "UChar")  {
      bool := (code > 0x7F || code < 0x30 || code = 0x3D)
      UrlStr .= bool ? "%" . Format("{:02X}", code) : Chr(code)
   }
   return UrlStr
}

GetJScript()
{
   script =
   (
      var TKK = ((function() {
        var a = 561666268;
        var b = 1526272306;
        return 406398 + '.' + (a + b);
      })());

      function b(a, b) {
        for (var d = 0; d < b.length - 2; d += 3) {
            var c = b.charAt(d + 2),
                c = "a" <= c ? c.charCodeAt(0) - 87 : Number(c),
                c = "+" == b.charAt(d + 1) ? a >>> c : a << c;
            a = "+" == b.charAt(d) ? a + c & 4294967295 : a ^ c
        }
        return a
      }

      function tk(a) {
          for (var e = TKK.split("."), h = Number(e[0]) || 0, g = [], d = 0, f = 0; f < a.length; f++) {
              var c = a.charCodeAt(f);
              128 > c ? g[d++] = c : (2048 > c ? g[d++] = c >> 6 | 192 : (55296 == (c & 64512) && f + 1 < a.length && 56320 == (a.charCodeAt(f + 1) & 64512) ?
              (c = 65536 + ((c & 1023) << 10) + (a.charCodeAt(++f) & 1023), g[d++] = c >> 18 | 240,
              g[d++] = c >> 12 & 63 | 128) : g[d++] = c >> 12 | 224, g[d++] = c >> 6 & 63 | 128), g[d++] = c & 63 | 128)
          }
          a = h;
          for (d = 0; d < g.length; d++) a += g[d], a = b(a, "+-a^+6");
          a = b(a, "+-3^+b+-f");
          a ^= Number(e[1]) || 0;
          0 > a && (a = (a & 2147483647) + 2147483648);
          a `%= 1E6;
          return a.toString() + "." + (a ^ h)
      }
   )
   return script
}

CreateScriptObj() {
   static doc
   doc := ComObjCreate("htmlfile")
   doc.write("<meta http-equiv='X-UA-Compatible' content='IE=9'>")
   return ObjBindMethod(doc.parentWindow, "eval")
}
;===================================================================================
;https://www.autohotkey.com/boards/viewtopic.php?f=6&t=63835&start=40#p316531

GetAudioFromGoogle(text, lng, mp3filePath)  {
	url := CreateUrl(text, lng)
	data := SendRequest2(url)
		if SubStr(data, 1, 6) = "Error!"
			return data
return SaveDataToFile(data, mp3filePath)
}

CreateUrl(text, lng)  {
JS := CreateScriptObj2(), JS.( GetJScript() )
url := "https://translate.google.ru/translate_tts?ie=UTF-8&tl="
	. lng . "&total=1&idx=0&client=t&prev=input&textlen="
	. StrLen(text) . "&tk=" . JS.("tk").(text) . "&q=" . URIEncode(text)
return url
}

SendRequest2(url) {
whr := ComObjCreate("Msxml2.XMLHTTP.6.0")
whr.Open("GET", url, false)
whr.Send()
	if (whr.Status != 200)
		return "Error! Status: " . whr.Status . "`n`n" . whr.responseBody
return whr.responseBody
}

SaveDataToFile(data, filePath) {
	stream := ComObjCreate("ADODB.Stream")
	stream.type := 1  ; Binary data
	stream.Open
	stream.Write(data)
	stream.SaveToFile(filePath, 2)
	stream.Close
return true
}

CreateScriptObj2() {
   static doc
   doc := ComObjCreate("htmlfile")
   doc.write("<meta http-equiv='X-UA-Compatible' content='IE=9'>")
   Return ObjBindMethod(doc.parentWindow, "eval")
}
;===================================================================================
;http://ahkscript.org/boards/viewtopic.php?t=1079

AutoXYWH(DimSize, cList*){
  static cInfo := {}
 
  If (DimSize = "reset")
    Return cInfo := {}
 
  For i, ctrl in cList {
    ctrlID := A_Gui ":" ctrl
    If ( cInfo[ctrlID].x = "" ){
        GuiControlGet, i, %A_Gui%:Pos, %ctrl%
		GuiControlGet, Hwnd, %A_Gui%:Hwnd, %ctrl%
        MMD := InStr(DimSize, "*") ? "MoveDraw" : "Move"
        fx := fy := fw := fh := 0
        For i, dim in (a := StrSplit(RegExReplace(DimSize, "i)[^xywh]")))
            If !RegExMatch(DimSize, "i)" dim "\s*\K[\d.-]+", f%dim%)
              f%dim% := 1
        cInfo[ctrlID] := { x:ix, fx:fx, y:iy, fy:fy, w:iw, fw:fw, h:ih, fh:fh, gw:A_GuiWidth, gh:A_GuiHeight, a:a , m:MMD}
    }Else If ( cInfo[ctrlID].a.1) {
        dgx := dgw := A_GuiWidth  - cInfo[ctrlID].gw  , dgy := dgh := A_GuiHeight - cInfo[ctrlID].gh
        For i, dim in cInfo[ctrlID]["a"]
            Options .= dim (dg%dim% * cInfo[ctrlID]["f" dim] + cInfo[ctrlID][dim]) A_Space
        GuiControl, % A_Gui ":" cInfo[ctrlID].m , % ctrl, % Options
} } }		
UnReALiTyy
Posts: 166
Joined: 06 Jun 2017, 11:38

Re: Project Google Übersetzer Gui v.(22.04.20)

22 Apr 2020, 08:46

UPDATE: Version(22.04.20)
GoB_Dura
Posts: 5
Joined: 25 Apr 2016, 17:58
Contact:

Re: Project Google Übersetzer Gui v.(22.04.20)

17 Oct 2020, 04:01

Echt Cooles Projekt.

Eine persönliche Idee
ich persönlich finde jetzt den Googleübersetzer nicht so gut, ginge das auch mit Deepl ? also https://www.deepl.com/translator
PS: gut, ich glaube bei Deepl gibt es keine Audio - aber die ganztext übersetzung finde ich bei deepl besser, ist aber glaub ich geschmackssache.

viele Grüße
Last edited by BoBo on 17 Oct 2020, 14:08, edited 1 time in total.
Reason: Fixed broken link.
halweg
Posts: 59
Joined: 17 Apr 2018, 10:34
Location: Dresden

Re: Project Google Übersetzer Gui v.(22.04.20)

17 Oct 2020, 11:46

Hallo und danke fürs Code teilen.

Ich würde gern systemübergreifend einen Hotkey aktivieren, der, egal in welchem Programm, den gerade markierten Text an den Übersetzer schickt und dort in eine Sprache der Wahl übersetzt. Ich bin noch nicht sicher, ob ich dafür eine spezielle GUI verwenden will, aber wenn ich es richtig sehe, wäre das von dir verwendete Modul GoogleTransalate() das, was ich brauche, oder?

Viele Grüße, Halweg
BoBo
Posts: 3873
Joined: 13 May 2014, 17:15

Re: Project Google Übersetzer Gui v.(22.04.20)

17 Oct 2020, 14:10

Hat deepl.com nicht eine beschränkte (Tages?)Textmenge bei kostenloser Verwendung??

Return to “Skripte und Funktionen”

Who is online

Users browsing this forum: No registered users and 4 guests