<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Сохранение(чтение) web страницы при заблокированном компьютере]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7283&amp;type=atom" />
	<updated>2012-06-20T06:28:44Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7283</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение(чтение) web страницы при заблокированном компьютере]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61033#p61033" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Текст из загруженной в IE страницы:</p><p>Сработает ли с xml — не пробовал.</p></blockquote></div><p>html страницу видит, а вот xml выдает пустоту.</p>]]></content>
			<author>
				<name><![CDATA[Yar1972]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28159</uri>
			</author>
			<updated>2012-06-20T06:28:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61033#p61033</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение(чтение) web страницы при заблокированном компьютере]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61023#p61023" />
			<content type="html"><![CDATA[<p>Текст из загруженной в IE страницы:<br /></p><div class="codebox"><pre><code>if !IE := GetWebBrowser()
{
   MsgBox, IE не найден!
   return
}
Text := IE.Document.body.innerText
;  MsgBox % Text
return

GetWebBrowser()
{
    ; Get a raw pointer to the document object of the top-most IE window.
    static msg := DllCall(&quot;RegisterWindowMessage&quot;, &quot;str&quot;, &quot;WM_HTML_GETOBJECT&quot;)
    SendMessage msg, 0, 0, Internet Explorer_Server1, ahk_class IEFrame
    if ErrorLevel = FAIL
        return  ; IE not found.
    lResult := ErrorLevel
    DllCall(&quot;oleacc\ObjectFromLresult&quot;, &quot;ptr&quot;, lResult
        , &quot;ptr&quot;, GUID(IID_IHTMLDocument2,&quot;{332C4425-26CB-11D0-B483-00C04FD90119}&quot;)
        , &quot;ptr&quot;, 0, &quot;ptr*&quot;, pdoc)
    
    ; Query for the WebBrowserApp service. In this particular case,
    ; the SID and IID are the same, but it isn&#039;t always this way.
    static IID_IWebBrowserApp := &quot;{0002DF05-0000-0000-C000-000000000046}&quot;
    static SID_SWebBrowserApp := IID_IWebBrowserApp
    pweb := ComObjQuery(pdoc, SID_SWebBrowserApp, IID_IWebBrowserApp)
    
    ; Release the document object pointer.
    ObjRelease(pdoc)
    
    ; Return the WebBrowser object, wrapped for usability:
    static VT_DISPATCH := 9, F_OWNVALUE := 1
    return ComObject(VT_DISPATCH, pweb, F_OWNVALUE)
}

GUID(ByRef GUID, sGUID) ; Converts a string to a binary GUID and returns its address.
{
    VarSetCapacity(GUID, 16, 0)
    return DllCall(&quot;ole32\CLSIDFromString&quot;, &quot;wstr&quot;, sGUID, &quot;ptr&quot;, &amp;GUID) &gt;= 0 ? &amp;GUID : &quot;&quot;
}</code></pre></div><p>Сработает ли с xml — не пробовал.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2012-06-19T20:33:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61023#p61023</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Сохранение(чтение) web страницы при заблокированном компьютере]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=61011#p61011" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Yar1972 пишет:</cite><blockquote><p>В открытой странице весь текст выделяется и копируется в буфер (Send, ^a^c) (думаю именно этот метод не работает при залоченной машине).</p></blockquote></div><p>Не думаю, что кто-то здесь проводил такие эксперименты. Попробуйте всё реализовать через COM, в крайнем случае можно работать напрямую с сокетами(на форуме был пример).</p>]]></content>
			<author>
				<name><![CDATA[Александр_]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24888</uri>
			</author>
			<updated>2012-06-19T17:37:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=61011#p61011</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Сохранение(чтение) web страницы при заблокированном компьютере]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60971#p60971" />
			<content type="html"><![CDATA[<p>Задача стоит следующая, при залоченной машине необходимо сохранить web страницу, вернее достаточно выдернуть с этой страницы часть текстовой информации.<br />При разлоченной машине все работает прекрасно. Я использую библиотеку WebControl for AutoHotkey для IE.&nbsp; <br />Сначала автологон (в форму подставляются имя и пароль), далее грузиться спец url по https. Формат загружаемой страницы xml.<br />В открытой странице весь текст выделяется и копируется в буфер (Send, ^a^c) (думаю именно этот метод не работает при залоченной машине).</p><p>Потом я анализируя буфер и легко нахожу нужную информацию.</p><p>Помогите советом, пожалуйста</p>]]></content>
			<author>
				<name><![CDATA[Yar1972]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28159</uri>
			</author>
			<updated>2012-06-18T15:32:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60971#p60971</id>
		</entry>
</feed>
