<?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=11035&amp;type=atom" />
	<updated>2015-10-27T15:56:04Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11035</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прокрутка на определённое количество строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=98328#p98328" />
			<content type="html"><![CDATA[<p>Если сообщение посылать ,то там одна строка мотается.<br /></p><div class="codebox"><pre><code>#if hwnd := WinActive(&quot;ahk_class Notepad&quot;)
WheelDown::  
ControlGetFocus, fcontrol, ahk_id %hwnd%
Loop 10 ; количество строк.
    SendMessage, 0x115, 1, 0, %fcontrol%,ahk_id %hwnd% ; msg:WM_VSCROLL , wParam:SB_LINEDOWN
KeyWait % A_ThisHotkey,T0.01
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-10-27T15:56:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=98328#p98328</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прокрутка на определённое количество строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=98316#p98316" />
			<content type="html"><![CDATA[<p>Можно так попробовать:<br /></p><div class="codebox"><pre><code>#If WinActive(&quot;ahk_class XLMAIN&quot;)
WheelDown::
   PrevValue := SetWheelScrollLines(1)
   MouseClick, WheelUp,,, 10
   SetWheelScrollLines(PrevValue)
   Return
   
SetWheelScrollLines(NewValue)
{
   static SPI_GETWHEELSCROLLLINES := 0x68, SPI_SETWHEELSCROLLLINES := 0x69, SPIF_UPDATEINIFILE := 0x1, SPIF_SENDCHANGE := 0x2
   DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_GETWHEELSCROLLLINES, UInt, 0, PtrP, PrevValue, UInt, 0)
   DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETWHEELSCROLLLINES, UInt, NewValue, PtrP, 0, UInt, SPIF_UPDATEINIFILE|SPIF_SENDCHANGE)
   Return PrevValue
}</code></pre></div><p>Но не факт, что сработает, как ожидалось.<br /><span style="color: green">Предыдущий пост цитировать не нужно, <a href="http://forum.script-coding.com/viewtopic.php?id=6148">ознакомьтесь</a> с правилами цитирования.</span></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-10-27T14:11:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=98316#p98316</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прокрутка на определённое количество строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=98304#p98304" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>А где она у вас находится?<br />Можно так:<br /></p><div class="codebox"><pre><code>#If WinActive(&quot;ahk_class XLMAIN&quot;)
WheelDown:: MouseClick, WheelUp,,, 10</code></pre></div></blockquote></div><br /><p>Находится просто в отдельном файле. Да, ваш код работает, спасибо за подсказку!</p><p>Правда, оказывается AHK прокручивает не на 10 строк, а делает 10 оборотов колёсиком. Есть ли какая-либо функция, в которой можно указать именно количество строк прокрутки?</p>]]></content>
			<author>
				<name><![CDATA[raznoczvetov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32329</uri>
			</author>
			<updated>2015-10-27T08:50:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=98304#p98304</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Прокрутка на определённое количество строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=98302#p98302" />
			<content type="html"><![CDATA[<p>А где она у вас находится?<br />Можно так:<br /></p><div class="codebox"><pre><code>#If WinActive(&quot;ahk_class XLMAIN&quot;)
WheelDown:: MouseClick, WheelUp,,, 10</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-10-27T08:03:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=98302#p98302</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Прокрутка на определённое количество строк]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=98301#p98301" />
			<content type="html"><![CDATA[<p>При запуске кода<br /></p><div class="codebox"><pre><code>
#If WinActive(&quot;ahk_class XLMAIN&quot;)
{
	WheelDown::
	MouseWheel(&quot;up&quot;, 10)
	Return

}</code></pre></div><p>пишет &quot;Error:&nbsp; Call to nonexistent function.&quot; на строку &quot;---&gt;	006: MouseWheel(&quot;up&quot;, 10)&quot;.<br />Как подключить эту функцию?</p>]]></content>
			<author>
				<name><![CDATA[raznoczvetov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32329</uri>
			</author>
			<updated>2015-10-27T07:55:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=98301#p98301</id>
		</entry>
</feed>
