<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Изменение чувствительности мыши.]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=5776</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5776&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Изменение чувствительности мыши.».]]></description>
		<lastBuildDate>Sun, 08 May 2011 09:15:04 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48224#p48224</link>
			<description><![CDATA[<p>Допиленный скрипт, сейчас опробовал, работает прекрасно! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><div class="codebox"><pre><code>#noenv
#singleinstance force
#ifwinactive ahk_class Valve001

SPI_GETMOUSESPEED = 0x70
SPI_SETMOUSESPEED = 0x71
DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, MouseSpeed, UInt, 0)

OldMouseSpeed := MouseSpeed 
SlowCoeff      = 0.1
OnExit, ExitLabel
return

~Lbutton:: 
MouseSpeed := MouseSpeed*SlowCoeff   ;Рассчет замедления.
if MouseSpeed &lt; 1                    ;Эксперименты показали, что значения 
    {                                ;меньше 1 игнорируются.
    MouseSpeed = 1
    }
DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, MouseSpeed, UInt, 0)
StringTrimLeft, Key, A_ThisHotKey, 1   ;Вырезаем тильду из переменной, чтобы 
KeyWait, %Key%                         ;сработала команда KeyWait.
MouseSpeed := OldMouseSpeed            ;При отпускании клавиши возвращаем предыдущее значение скорости.
DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, MouseSpeed, UInt, 0)
return

ExitLabel:
MouseSpeed := OldMouseSpeed
DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, MouseSpeed, UInt, 0)
exitapp</code></pre></div><p><strong>teadrinker</strong>, <span class="postimg"><img src="http://img1.liveinternet.ru/images/attach/c/2//67/295/67295670_Blagodaryu.gif" alt="http://img1.liveinternet.ru/images/attach/c/2//67/295/67295670_Blagodaryu.gif" /></span></p>]]></description>
			<author><![CDATA[null@example.com (MasS)]]></author>
			<pubDate>Sun, 08 May 2011 09:15:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48224#p48224</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48223#p48223</link>
			<description><![CDATA[<p>Предположу только, что дело в различных версиях CS и, соответственно, различных адресах сенсы, у меня работает (только что перепроверил). А вот уменьшение чувствительности скроллом это просто супер! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (MasS)]]></author>
			<pubDate>Sun, 08 May 2011 09:09:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48223#p48223</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48222#p48222</link>
			<description><![CDATA[<p>OFF:</p><div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Этот, наверное. Он сейчас в архиве после чистки форума.</p></blockquote></div><p>Если есть нужда — подымайте его обратно из архива в Разработку.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Sun, 08 May 2011 08:29:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48222#p48222</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48221#p48221</link>
			<description><![CDATA[<p><strong>MasS</strong>, твой скрипт у меня не работает. <br /></p><div class="quotebox"><cite>sergeant.coolagin пишет:</cite><blockquote><p>Я еще раньше видел тут на форуме скрипт на изменение чувствительности мыши скролом.</p></blockquote></div><p>Этот, наверное. Он сейчас в архиве после чистки форума.<br /></p><div class="codebox"><pre><code>;начальная инициализация. Берет текущую (при загрузке скрипта) скорость мышки.
SPI_GETMOUSESPEED = 0x70
SPI_SETMOUSESPEED = 0x71
DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_GETMOUSESPEED, UInt, 0, UIntP, MouseSpeed, UInt, 0)
ToolTip, Mouse speed: %MouseSpeed% pixels
SetTimer, RemoveToolTip, 1000

wheelup::
;Ctrl+Numpad8
   MouseSpeed++ ;увеличивает на 1 текущую скорость мышки
   DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, MouseSpeed, UInt, 0) ;задает ее системе
   ToolTip, Mouse speed: %MouseSpeed% pixels ; выдает подсказку у курсора о текущей скорости
   SetTimer, RemoveToolTip, 1000
return

wheeldown::
If MouseSpeed &gt; 1
    MouseSpeed--
else                          ;если скорость минимальна то показать подсказку и выйти
{
    ToolTip, Mouse speed: minimal
    return
}
 DllCall(&quot;SystemParametersInfo&quot;, UInt, SPI_SETMOUSESPEED, UInt, 0, UInt, MouseSpeed, UInt, 0)
ToolTip, Mouse speed: %MouseSpeed% pixels
SetTimer, RemoveToolTip, 1000
return

RemoveToolTip:                           ;подпрограмма убирания подсказки
SetTimer, RemoveToolTip, Off
ToolTip
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sun, 08 May 2011 08:02:31 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48221#p48221</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48102#p48102</link>
			<description><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=2734">Доступ к памяти других процессов.</a><br />Адрес сенсы ищется с помощью программы <strong>ArtMoney</strong>, у неё есть подробное описание на русском языке.</p><p>Управление сенсой в CS 1.6:<br />При нажатии левой клавиши мыши скрипт посылает нажатие, запоминает текущее значение сенсы и меняет его на 0 (на деле скорость не становится равна 0, но весьма значительно замедляется).<br />При отпускании левой клавиши мыши скрипт возвращает предыдущее значение сенсы.</p><div class="codebox"><pre><code>#noenv
#singleinstance force
#ifwinactive ahk_class Valve001

*$~lbutton::
WinGet, ID, PID, A
WriteAddress = 0x0392364C
ReadAddress = 0x0392364C
Size = 4
Data = 0
PreviousSence := GetVar(ReadAddress,ID,Size) ;запоминаем текущую сенсу
WriteVar(WriteAddress,ID,Size,Data) 
return

*$~lbutton up::
WinGet, ID, PID, A
WriteAddress = 0x0392364C
Size = 4
Data := PreviousSence                    ;возвращаем записанную ранее сенсу
WriteVar(WriteAddress,ID,Size,Data) 
return

;***************функции*************************
WriteVar(WriteAddress,ID,Size,Data) 
{
Address := WriteAddress           ; Адрес, куда писать.
Data := Data                      ; Что писать.
Size := Size                      ; Сколько байт писать.

VarSetCapacity(Buf, Size, 0)      ; Буфер, для записываемых данных.

NumPut(Data, Buf, 0, &quot;UInt&quot;)      ; Данные - в буфер.

PROCESS_VM_WRITE = 0x20           ; Права на процесс.
PROCESS_VM_OPERATION = 0x8

PID := ID

hProcess := DllCall(&quot;OpenProcess&quot;, &quot;UInt&quot;, PROCESS_VM_WRITE | PROCESS_VM_OPERATION
                                 , &quot;Int&quot;,  False
                                 , &quot;UInt&quot;, PID)
If(!hProcess) {
  MsgBox, Не удалось открыть процесс.
  ExitApp
}

Ret := DllCall(&quot;WriteProcessMemory&quot;, &quot;UInt&quot;, hProcess
                                   , &quot;UInt&quot;, Address
                                   , &quot;UInt&quot;, &amp;Buf
                                   , &quot;UInt&quot;, Size
                                   , &quot;UInt&quot;, 0)

DllCall(&quot;CloseHandle&quot;, &quot;UInt&quot;, hProcess) ; Освобождение хэндла процесса.

If(!Ret) {
  MsgBox, Не удалось записать.
  ExitApp
}
}

GetVar(ReadAddress,ID,Size) 
{
PID := DllCall(&quot;GetCurrentProcessId&quot;)
ReadAddress := ReadAddress        ; Адрес, откуда читать.
ReadSize := Size                  ; Сколько байт читать.
VarSetCapacity(Buf, ReadSize, 0)  ; Буфер, куда считывать.    
PROCESS_VM_READ = 0x10            ; Права на процесс.

PID := ID

hProcess := DllCall(&quot;OpenProcess&quot;, UInt, PROCESS_VM_READ
                                 , Int, False
                                 , UInt, PID)
If(!hProcess) {
  MsgBox, Не удалось открыть процесс.
  ExitApp
}

Ret := DllCall(&quot;ReadProcessMemory&quot;, UInt, hProcess
                                  , UInt, ReadAddress
                                  , UInt, &amp;Buf
                                  , UInt, ReadSize
                                  , UInt, 0)

DllCall(&quot;CloseHandle&quot;, UInt, hProcess) ; Освобождение хэндла процесса.

If(!Ret) {
  MsgBox, Не удалось прочитать.
  ExitApp
}

return NumGet(Buf, 0, &quot;UInt&quot;)  ; Считывание из буфера в переменную.

}</code></pre></div><p>P.S. Классная идея, надо сделать замедление курсора на Shift <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /><em>*для справки в CS есть консоль, вызываемая буквой Ё, все настройки можно задавать через неё, так, чтобы задать сенсу, надо написать <strong>sensitivity X</strong>, где X - значение сенсы*</em></p>]]></description>
			<author><![CDATA[null@example.com (MasS)]]></author>
			<pubDate>Wed, 04 May 2011 16:25:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48102#p48102</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Изменение чувствительности мыши.]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=48083#p48083</link>
			<description><![CDATA[<p>Вот в&nbsp; этой теме <a href="http://forum.script-coding.com/viewtopic.php?id=5768">http://forum.script-coding.com/viewtopic.php?id=5768</a>&nbsp; нужно было заблокировать курсор... У меня есть другая идея, как можно решить мою проблему...<br />Можно ли через Autohotkey уменьшить чувствительность мыши меньше чем дает стандартные возможности windows? Уменьшить sensitiviti, скажем до 0.00001, если учесть что было 2, и тогда будет казаться, что курсор совсем не двигается. Можно так сделать?<br />P.S. Я еще раньше видел тут на форуме скрипт на изменение чувствительности мыши скролом. Только он мне тогда не нужен был. Сейчас начал искать его - не нашел. Пол часа искал. Гугл тоже никаких похожих команд не выдал. Еще дайте ссылку на тот скрипт, пожалуйста.</p>]]></description>
			<author><![CDATA[null@example.com (sergeant.coolagin)]]></author>
			<pubDate>Wed, 04 May 2011 01:24:32 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=48083#p48083</guid>
		</item>
	</channel>
</rss>
