<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Функция чтения памяти перестала работать]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10286&amp;type=atom" />
	<updated>2014-12-29T03:42:11Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10286</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Функция чтения памяти перестала работать]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89829#p89829" />
			<content type="html"><![CDATA[<p>Возможно, там версия AutoHotkey устаревшая.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2014-12-29T03:42:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89829#p89829</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Функция чтения памяти перестала работать]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89826#p89826" />
			<content type="html"><![CDATA[<p>Зато у вас именно эта ошибка. <a href="http://forum.script-coding.com/viewtopic.php?id=6148">Прошу ознакомиться</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-12-28T20:05:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89826#p89826</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Функция чтения памяти перестала работать]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89825#p89825" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="quotebox"><cite>Dworkin пишет:</cite><blockquote><p>Хотя на другом ноуте все работает</p></blockquote></div><p><span style="color: green">Error: Missing point</span></p></blockquote></div><p>Не понял о чем вы.<br />Вот именно что при запуске скрипта сразу выдается именно та ошибка которую я написал. Именно comma, а не point.</p>]]></content>
			<author>
				<name><![CDATA[Dworkin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27052</uri>
			</author>
			<updated>2014-12-28T20:01:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89825#p89825</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Функция чтения памяти перестала работать]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89824#p89824" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Dworkin пишет:</cite><blockquote><p>Хотя на другом ноуте все работает</p></blockquote></div><p><span style="color: green">Error: Missing point</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2014-12-28T19:38:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89824#p89824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Функция чтения памяти перестала работать]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=89823#p89823" />
			<content type="html"><![CDATA[<p>Здравствуйте.<br />Данная функция для чтения из памяти работала на другом ноутбуке(где стояла x32 windows XP):<br /></p><div class="codebox"><pre><code>ProcessReadMemory(address, processIDorName, type := &quot;Int&quot;, numBytes := 4) {
    VarSetCapacity(buf, numBytes, 0)
    VarSetCapacity(numBytesRead, A_PtrSize, 0)

    Process Exist, %processIDorName%
    if !processID := ErrorLevel
        throw Exception(&quot;Invalid process name or process ID:`n`n&quot;&quot;&quot; . processIDorName . &quot;&quot;&quot;&quot;)

    if !processHandle := DllCall(&quot;OpenProcess&quot;, &quot;Int&quot;, 24, &quot;UInt&quot;, 0, &quot;UInt&quot;, processID, &quot;Ptr&quot;)
        throw Exception(&quot;Failed to open process.`n`nError code:`t&quot; . A_LastError)

    result := DllCall(&quot;ReadProcessMemory&quot;, &quot;Ptr&quot;, processHandle, &quot;Ptr&quot;, address, &quot;Ptr&quot;, &amp;buf, &quot;Ptr&quot;, numBytes, &quot;PtrP&quot;, numBytesRead, &quot;UInt&quot;)

    if !DllCall(&quot;CloseHandle&quot;, &quot;Ptr&quot;, processHandle, &quot;UInt&quot;) &amp;&amp; !result
        throw Exception(&quot;Failed to close process handle.`n`nError code:`t&quot; . A_LastError)

    if !result
        throw Exception(&quot;Failed to read process memory.`n`nError code:`t&quot; . A_LastError)

    if !numBytesRead
        throw Exception(&quot;Read 0 bytes from the`n`nprocess:`t&quot; . processIDorName . &quot;`naddress:`t&quot; . address)

    return NumGet(buf, 0, type)
}</code></pre></div><p>Я перенес скрипт на другой ноутбук на котором стоит windows 7 x64 и теперь при запуске скрипта выскакивает такое:<br /></p><div class="codebox"><pre><code>Line text: ProcessReadMemory(address, processIDorName, type := &quot;Int&quot;, numBytes := 4)
Error: Missing comma</code></pre></div><p> <br />Хотя на другом ноуте все работает</p>]]></content>
			<author>
				<name><![CDATA[Dworkin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27052</uri>
			</author>
			<updated>2014-12-28T19:32:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=89823#p89823</id>
		</entry>
</feed>
