<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Переводчик онлайн]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=5660</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=5660&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Переводчик онлайн».]]></description>
		<lastBuildDate>Tue, 14 Sep 2021 14:33:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=149536#p149536</link>
			<description><![CDATA[<p><strong>elektrovenik</strong>, согласен, добавлю, как руки дойдут. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 14 Sep 2021 14:33:42 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=149536#p149536</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=149535#p149535</link>
			<description><![CDATA[<p>Приветствую! На мой взгляд не хватает функции/кнопки быстрого копирования переведенного текста. Можно добавить эту кнопку рядом с кнопкой плей\стоп воспроизведения текста, либо сделать чекбокс, включающий возможность автокопирования в буфер уже переведенного текста.</p>]]></description>
			<author><![CDATA[null@example.com (elektrovenik)]]></author>
			<pubDate>Tue, 14 Sep 2021 08:51:26 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=149535#p149535</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146950#p146950</link>
			<description><![CDATA[<p>Обновил <a href="https://forum.script-coding.com/viewtopic.php?pid=35906#p35906">пост</a> в Коллекции.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 26 Mar 2021 00:09:41 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146950#p146950</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146949#p146949</link>
			<description><![CDATA[<p>Ага, класс, я был уверен, что ты что-то нагуглишь! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 23:26:46 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146949#p146949</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146948#p146948</link>
			<description><![CDATA[<p>Первый у меня тоже дает:<br /></p><div class="codebox"><pre><code>MsgBox, % GoogleTranslate(&quot;test&quot;, &quot;en&quot;, &quot;ru&quot;)

GoogleTranslate(str, from := &quot;auto&quot;, to := &quot;en&quot;)  {
   static JS := CreateScriptObj(), _ := JS.( GetJScript() ) := JS.(&quot;delete ActiveXObject; delete GetObject;&quot;)
   
   json := SendRequest(JS, str, to, from, proxy := &quot;&quot;)
   oJSON := JS.(&quot;(&quot; . json . &quot;)&quot;)

   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 .= &quot;`n+&quot;
         obj := oJSON[1][A_Index-1][1]
         Loop % obj.length  {
            txt := obj[A_Index - 1]
            trans .= (MainTransText = txt ? &quot;&quot; : &quot;`n&quot; txt)
         }
      }
   }
   if !IsObject(oJSON[1])
      MainTransText := trans := Trim(trans, &quot;,+`n &quot;)
   else
      trans := MainTransText . &quot;`n+`n&quot; . Trim(trans, &quot;,+`n &quot;)

   from := oJSON[2]
   trans := Trim(trans, &quot;,+`n &quot;)
   Return trans
}

SendRequest(JS, str, tl, sl, proxy) {
   static http
   ComObjError(false)
   if !http
   {
      http := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
      ( proxy &amp;&amp; http.SetProxy(2, proxy) )
      http.open( &quot;get&quot;, &quot;https://translate.google.com&quot;, 1 )
      http.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0&quot;)
      http.send()
      http.WaitForResponse(-1)
   }

   http.open( &quot;POST&quot;, &quot;https://translate.googleapis.com/translate_a/single?client=gtx&amp;sl=&quot;
      . sl . &quot;&amp;tl=&quot; . tl . &quot;&amp;hl=&quot; . tl
      . &quot;&amp;dt=at&amp;dt=bd&amp;dt=ex&amp;dt=ld&amp;dt=md&amp;dt=qca&amp;dt=rw&amp;dt=rm&amp;dt=ss&amp;dt=t&amp;ie=UTF-8&amp;oe=UTF-8&amp;otf=0&amp;ssel=0&amp;tsel=0&amp;pc=1&amp;kc=1&quot;
      . &quot;&amp;tk=&quot; . JS.(&quot;tk&quot;).(str), 1 )

   http.SetRequestHeader(&quot;Content-Type&quot;, &quot;application/x-www-form-urlencoded;charset=utf-8&quot;)
   http.SetRequestHeader(&quot;User-Agent&quot;, &quot;Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0&quot;)
   http.send(&quot;q=&quot; . URIEncode(str))
   http.WaitForResponse(-1)
msgbox % http.responsetext
   Return http.responsetext
}

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

   While code := NumGet(Var, A_Index - 1, &quot;UChar&quot;)  {
      bool := (code &gt; 0x7F || code &lt; 0x30 || code = 0x3D)
      UrlStr .= bool ? &quot;%&quot; . Format(&quot;{:02X}&quot;, code) : Chr(code)
   }
   Return UrlStr
}

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

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

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

CreateScriptObj() {
   static doc
   doc := ComObjCreate(&quot;htmlfile&quot;)
   doc.write(&quot;&lt;meta http-equiv=&#039;X-UA-Compatible&#039; content=&#039;IE=9&#039;&gt;&quot;)
   Return ObjBindMethod(doc.parentWindow, &quot;eval&quot;)
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 25 Mar 2021 23:21:35 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146948#p146948</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146947#p146947</link>
			<description><![CDATA[<p>А, нет, второй вариант вроде даёт! Надо потестить.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 23:14:49 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146947#p146947</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146946#p146946</link>
			<description><![CDATA[<p>Спасибо, работает! Но не даёт вариантов:<br /><a href="https://translate.googleapis.com/translate_a/single?client=gtx&amp;sl=en&amp;tl=ru&amp;dt=t&amp;q=test">https://translate.googleapis.com/transl … amp;q=test</a><br /></p><div class="quotebox"><blockquote><p>[[[&quot;тест&quot;,&quot;test&quot;,null,null,10]<br />]<br />,null,&quot;en&quot;,null,null,null,null,[]<br />]</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 23:13:01 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146946#p146946</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146945#p146945</link>
			<description><![CDATA[<p>Либо так:<br /></p><div class="codebox"><pre><code>https://translate.googleapis.com/translate_a/single?client=gtx</code></pre></div><p>Либо так:<br /></p><div class="codebox"><pre><code>https://clients5.google.com/translate_a/t?client=dict-chrome-ex</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 25 Mar 2021 23:03:56 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146945#p146945</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146935#p146935</link>
			<description><![CDATA[<p><span class="postimg"><img src="https://i.imgur.com/aX5qX7B.png" alt="https://i.imgur.com/aX5qX7B.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 21:36:33 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146935#p146935</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146934#p146934</link>
			<description><![CDATA[<p>А пример можешь привести?</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 25 Mar 2021 21:29:40 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146934#p146934</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146930#p146930</link>
			<description><![CDATA[<p>Не, стало криво переводить, не так, как на сайте Google Translate.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 21:14:35 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146930#p146930</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146927#p146927</link>
			<description><![CDATA[<p>У меня вроде нормально работает.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Thu, 25 Mar 2021 20:57:22 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146927#p146927</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=146923#p146923</link>
			<description><![CDATA[<p>Опять вроде алгоритм поменялся.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 25 Mar 2021 18:15:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=146923#p146923</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=139337#p139337</link>
			<description><![CDATA[<p>Нет, я этим не интересовался.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Tue, 05 May 2020 15:50:44 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=139337#p139337</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переводчик онлайн]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=139336#p139336</link>
			<description><![CDATA[<p><strong>teadrinker</strong>, не было ли варианта основной части скрипта для возможности перевода HTML-кода, как это происходит по кнопке из браузера? — <span class="postimg"><img src="https://i.imgur.com/SZ3jSmC.png" alt="https://i.imgur.com/SZ3jSmC.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (DD)]]></author>
			<pubDate>Tue, 05 May 2020 15:30:09 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=139336#p139336</guid>
		</item>
	</channel>
</rss>
