<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Создание QRCode]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17232&amp;type=atom" />
	<updated>2022-07-08T15:38:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17232</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153827#p153827" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><strong>Malcev</strong> приветствую!<br />Пиши в теме, как время будет, если у тебя есть решения, то вообще хорошо.</p></div></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-07-08T15:38:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153827#p153827</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153826#p153826" />
			<content type="html"><![CDATA[<div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><strong>serzh82saratov</strong>, привет!<br />Собираешься ли убирать баги в ahk spy?</p></div></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2022-07-08T15:34:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153826#p153826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153807#p153807" />
			<content type="html"><![CDATA[<p>Да, ещё раз посмотрел, полная жуть.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-07-07T14:48:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153807#p153807</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153806#p153806" />
			<content type="html"><![CDATA[<p>Там, похоже много перелопатить придётся, надо глубоко разбираться. Функция CONVERT_TO_BYTE_ENCODING должна выглядеть как-то так:<br /></p><div class="codebox"><pre><code>MsgBox, % CONVERT_TO_BYTE_ENCODING(&quot;тест&quot;)

CONVERT_TO_BYTE_ENCODING(MESSAGE_TO_ENCODE) {
   Loop, parse, MESSAGE_TO_ENCODE
   {
      code := Asc(A_LoopField)
      MESSAGE_STRING .= Format(&quot;{:016}&quot;, ToBin(code))
   }
   Return MESSAGE_STRING
}

ToBin(Number)
{
   While Number
      bin := (Number&amp;1 ? 1 : 0) . bin, Number &gt;&gt;= 1
   Return bin
}</code></pre></div><p>Но без дополнительных изменений не будет работать.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-07-07T12:44:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153806#p153806</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153805#p153805" />
			<content type="html"><![CDATA[<p>Привет, спасибо!<br />Онлайн не надо. На офф форуме тоже есть.</p><p>Как и в большинстве случаев, пока тут тему не создам, не могу найти. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />И вот через час <a href="https://github.com/RobertWu-TIBCO/AHKScripts/blob/0c05a14b7cad11c138053540c5819a66a812f4c8/AHKManager/Plugins/QRCode.ahk">наткнулся на quricol32.dll</a>, работает нормально.<br />Но конечно если допилить на анк, было бы круто, там и подсказка есть.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-07-07T12:01:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153805#p153805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153804#p153804" />
			<content type="html"><![CDATA[<p>Привет, привет!<br />А онлайн вариант не подойдёт? Уже постил тут где-то:<br /></p><div class="codebox"><pre><code>len := QrGenerator(&quot;https://forum.script-coding.com/&quot;, pngData, 200)
FileOpen(A_ScriptDir . &quot;\qr.png&quot;, &quot;w&quot;).RawWrite(pngData, len)
Gui, Margin, 0, 0
Gui, Add, Pic,, % A_ScriptDir . &quot;\qr.png&quot;
Gui, Show
Return

GuiClose() {
   ExitApp
}

QrGenerator(text, ByRef pngData, qrSizePix := 300, correctionLevel := &quot;M&quot;) {
; correctionLevel: L, M, Q, H
   static url := &quot;https://chart.googleapis.com/chart?cht=qr&quot;
   completeUrl := url . &quot;&amp;chl=&quot; . EncodeDecodeURI(text) . &quot;&amp;chs=&quot; . qrSizePix . &quot;&amp;chld=&quot; . correctionLevel
   dataLen := WebRequest(completeUrl, pngData,,,, error := &quot;&quot;)
   if (error != &quot;&quot;)
      throw error
   Return dataLen
}

EncodeDecodeURI(str, encode := true, component := true) {
   static Doc, JS
   if !Doc {
      Doc := ComObjCreate(&quot;htmlfile&quot;)
      Doc.write(&quot;&lt;meta http-equiv=&quot;&quot;X-UA-Compatible&quot;&quot; content=&quot;&quot;IE=9&quot;&quot;&gt;&quot;)
      JS := Doc.parentWindow
      ( Doc.documentMode &lt; 9 &amp;&amp; JS.execScript() )
   }
   Return JS[ (encode ? &quot;en&quot; : &quot;de&quot;) . &quot;codeURI&quot; . (component ? &quot;Component&quot; : &quot;&quot;) ](str)
}

WebRequest(url, ByRef data, method := &quot;GET&quot;, HeadersArray := &quot;&quot;, body := &quot;&quot;, ByRef error := &quot;&quot;) {
   Whr := ComObjCreate(&quot;WinHttp.WinHttpRequest.5.1&quot;)
   Whr.Open(method, url, true)
   for name, value in HeadersArray
      Whr.SetRequestHeader(name, value)
   Whr.Send(body)
   Whr.WaitForResponse()
   status := Whr.status
   if (status != 200)
      error := &quot;HttpRequest error, status: &quot; . status
   Arr := Whr.responseBody
   pData := NumGet(ComObjValue(arr) + 8 + A_PtrSize)
   length := Arr.MaxIndex() + 1
   VarSetCapacity(data, length, 0)
   DllCall(&quot;RtlMoveMemory&quot;, &quot;Ptr&quot;, &amp;data, &quot;Ptr&quot;, pData, &quot;Ptr&quot;, length)
   Return length
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-07-07T11:53:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153804#p153804</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Создание QRCode]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=153803#p153803" />
			<content type="html"><![CDATA[<p>Всем привет! Давно меня тут не было. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><p>Пытаюсь найти библиотеку для создания QR кодов.<br />Пока смог найти только <a href="https://www.autohotkey.com/boards/viewtopic.php?f=6&amp;t=5538">эту</a>.<br />Работает отлично, но нет поддержки юникода. Там <a href="https://www.autohotkey.com/boards/viewtopic.php?f=6&amp;t=5538&amp;sid=4965205ad796a943e584df1587395a14&amp;start=80#p434136">предлагается</a> решение, но не могу разобрать в чём оно заключается.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2022-07-07T10:46:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=153803#p153803</id>
		</entry>
</feed>
