<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Chrome.ahk и пользователь в windows server 2008 r2]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16777&amp;type=atom" />
	<updated>2021-12-05T08:05:16Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16777</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Chrome.ahk и пользователь в windows server 2008 r2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150950#p150950" />
			<content type="html"><![CDATA[<p>В Chrome.ahk есть следующий класс, в котором находится текст из ошибки<br /></p><div class="codebox"><pre><code>class WebSocket
		{
			__New(WS_URL)
			{
				static wb
				
				; Create an IE instance
				Gui, +hWndhOld
				Gui, New, +hWndhWnd
				this.hWnd := hWnd
				Gui, Add, ActiveX, vWB, Shell.Explorer
				Gui, %hOld%: Default
				
				; Write an appropriate document
				WB.Navigate(&quot;about:&lt;!DOCTYPE html&gt;&lt;meta http-equiv=&#039;X-UA-Compatible&#039;&quot;
				. &quot;content=&#039;IE=edge&#039;&gt;&lt;body&gt;&lt;/body&gt;&quot;)
				while (WB.ReadyState &lt; 4)
					sleep, 50
				this.document := WB.document
				
				; Add our handlers to the JavaScript namespace
				this.document.parentWindow.ahk_savews := this._SaveWS.Bind(this)
				this.document.parentWindow.ahk_event := this._Event.Bind(this)
				this.document.parentWindow.ahk_ws_url := WS_URL
				
				; Add some JavaScript to the page to open a socket
				Script := this.document.createElement(&quot;script&quot;)
				Script.text := &quot;ws = new WebSocket(ahk_ws_url);`n&quot;
				. &quot;ws.onopen = function(event){ ahk_event(&#039;Open&#039;, event); };`n&quot;
				. &quot;ws.onclose = function(event){ ahk_event(&#039;Close&#039;, event); };`n&quot;
				. &quot;ws.onerror = function(event){ ahk_event(&#039;Error&#039;, event); };`n&quot;
				. &quot;ws.onmessage = function(event){ ahk_event(&#039;Message&#039;, event); };&quot;
				this.document.body.appendChild(Script)
			}
			
			; Called by the JS in response to WS events
			_Event(EventName, Event)
			{
				this[&quot;On&quot; EventName](Event)
			}
			
			; Sends data through the WebSocket
			Send(Data)
			{
				this.document.parentWindow.ws.send(Data)
			}
			
			; Closes the WebSocket connection
			Close(Code:=1000, Reason:=&quot;&quot;)
			{
				this.document.parentWindow.ws.close(Code, Reason)
			}
			
			; Closes and deletes the WebSocket, removing
			; references so the class can be garbage collected
			Disconnect()
			{
				if this.hWnd
				{
					this.Close()
					Gui, % this.hWnd &quot;: Destroy&quot;
					this.hWnd := False
				}
			}
		}</code></pre></div><p>Может кто знает как обойти эту ошибку?</p>]]></content>
			<author>
				<name><![CDATA[Ander]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42151</uri>
			</author>
			<updated>2021-12-05T08:05:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150950#p150950</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Chrome.ahk и пользователь в windows server 2008 r2]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=150886#p150886" />
			<content type="html"><![CDATA[<p>Добрый день!<br />Есть тестовый скрипт<br /></p><div class="codebox"><pre><code>#Include Chrome.ahk
ChromeInst := new Chrome(,, &quot;--incognito&quot;) ; ,, &quot;--headless&quot;) ;Запускаем окно браузера в режиме инкогнито
PageInst := ChromeInst.GetPage()
Send, ^l
Sleep, 500
SendRAW, https://site.com
Sleep, 100
Send, {Enter}
PageInst.WaitForLoad()
Sleep, 3000
ExitApp
return</code></pre></div><p>Под учетной записью админа работает, под учетной записью пользователя выдает 2 ошибки и на этом все. <br /><span class="postimg"><img src="https://i.piccy.info/i9/c5f9dde15ebe7a0605522311e044ef17/1638395343/36231/1450312/test1.png" alt="https://i.piccy.info/i9/c5f9dde15ebe7a0605522311e044ef17/1638395343/36231/1450312/test1.png" /></span><br />Пробовал добавить в исключения security_TEST.exe - первая ошибка уходит, по второй не получается добавить в исключения текст &lt;!DOCTYPE html&gt;...<br />Подскажите пожалуйста как решить проблему, может кто с этим стыкался?</p>]]></content>
			<author>
				<name><![CDATA[Ander]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42151</uri>
			</author>
			<updated>2021-12-01T21:45:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=150886#p150886</id>
		</entry>
</feed>
