<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; Реверсивное движение курсора]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=12376</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12376&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Реверсивное движение курсора».]]></description>
		<lastBuildDate>Tue, 31 Jan 2017 21:00:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111733#p111733</link>
			<description><![CDATA[<p>Вот тут нужно изменять цифровые значения, если нужно использовать знак &quot;-&quot; .Пример (&quot;-5 влево&quot;, &quot;5 вправо&quot; &quot;25 вниз&quot;, &quot;-25 ввверх&quot;).Получаются возвратно поступательные движения. Цифровое значение &quot;5...10&quot;, пример(&quot;5вправо слабо&quot;,&quot;10вправо сильнее&quot;).<br /></p><div class="codebox"><pre><code>move :=5
move1 := 25
} else {
key := &quot;d&quot;
move := -5
move1 := -25</code></pre></div><p>Сам код.<br /></p><div class="codebox"><pre><code>mouseXY(x, y){
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
}

strafe(left){
moveCount := 15
sleepInterval := 2
if(left){
key := &quot;a&quot;
move :=5
move1 := 25
} else {
key := &quot;d&quot;
move := -5
move1 := -25
}
Send, {Blind}{%key% down}
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, 5)
Loop, %moveCount% {
mouseXY(move, move1)
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, sleepInterval)
}
Send, {Blind}{%key% up}
}

*XButton1::
while getkeystate(&quot;XButton1&quot;,&quot;P&quot;) {
strafe(false)
strafe(true)
}
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Tue, 31 Jan 2017 21:00:14 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111733#p111733</guid>
		</item>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111682#p111682</link>
			<description><![CDATA[<p>Какие значения нужно изменить, чтобы курсор двигался в желаемую сторону? К примеру вверх, или же по диагонали с лева на права.</p><div class="codebox"><pre><code>mouseXY(x, y){
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
}

strafe(left){
moveCount := 15
sleepInterval := 2
relativeMove := 93
if(left){
key := &quot;a&quot;
move := -relativeMove
move1 := -relativeMove
} else {
key := &quot;d&quot;
move := relativeMove
move1 := relativeMove
}
Send, {Blind}{%key% down}
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, 5)
Loop, %moveCount% {
mouseXY(move, move1)
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, sleepInterval)
}
Send, {Blind}{%key% up}
}

*XButton1::
while getkeystate(&quot;XButton1&quot;,&quot;P&quot;) {
strafe(false)
strafe(true)
}
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (wowo)]]></author>
			<pubDate>Tue, 31 Jan 2017 10:08:21 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111682#p111682</guid>
		</item>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111670#p111670</link>
			<description><![CDATA[<p>Вот скрипт с сохранение профилей, писал для себя .<br /></p><div class="codebox"><pre><code>#SingleInstance force
#Persistent
#NoEnv
SendMode Input
SetBatchLines, -1
#MaxHotkeysPerInterval
#HotkeyInterval, -1


DllCall(&quot;LoadKeyboardLayout&quot;, &quot;Str&quot;, &quot;00000409&quot;, &quot;Int&quot;, 1)

Gui, Color, 9CEE90

Gui, Font, s11 Bold, Cambria

Gui, Add, Text, x82 y10 w40 h20 cBlue, Y pos

Gui, Add, Edit, x92 y40 w40 h20 cRed  vDllCall3  
 
Gui, Add, Text, x12 y10 w40 h20 cBlue, X pos

Gui, Add, Edit, x22 y40 w40 h20 cRed vDllCall1 

Gui, Add, Text, x162 y10 w40 h20 cBlue, Delay

Gui, Add, Edit, x162 y40 w40 h20 cRed  vDllCall2, 20

Gui, Add, Edit, x95 y125 w40 h20 cRed  vDllCall4, 2 

Gui, Add, Button, x192 y90 w42 h20 gSave, Save

Gui, Add, Button, x20 y90 w42 h20 gOpen, Open

Gui, Add, Button, x108 y90 w42 h20 gOK, OK

Gui, Show, x557 y130 h171 w255, LightGreen = {:-) 

return

*~vk7A:: ; свернуть - для точной настройки макроса
Suspend, On

return

~vk79::  ; f10 выход
Suspend, Off
ExitApp
return

~vk78::
Suspend, toggle
return

*~WheelUp:: ; колесо вверх активация макроса
Suspend, Off
MoveOFF := 1
MoveON := 0
stop := 0
Return

*~vk47:: ; G - бросок гранаты
 KeyWait, LButton
Suspend, On
KeyWait, LButton, D
 Suspend, Off
return

*~WheelDown::
Suspend, On
MoveOFF := 0
MoveON := 0
stop := 0
return

*~vk51::  ; Q - переключение на пистолет
MoveOFF := 0
MoveON := 1
stop := 1
return

*~vk76::  ; F7
Gui Submit, NoHide
Suspend, Off
If keystroke = 1
  {
    keystroke = 
     np := 0
op := 0
SoundBeep, 1000
  }
Else if keystroke = 
  {
    keystroke = 1
    np := 0x08 
op := 0x010
SoundBeep, 1000
  }
return

return

$vk75::  ; F6
Gui Submit, NoHide
Suspend, Off
If keystroke = 1
  {
    keystroke = 
     n := 0
o := 0
SoundBeep, 1000
  }
Else if keystroke = 
  {
    keystroke = 1
    n := 0x02
o := 0x04
SoundBeep, 1000
  }
return
  
; 0x02 нажать лкм
; 0x04 отпустить лкм
;0x08 нажать пкм
;0x010 отпустить пкм

*~$LButton::

      DllCall(&quot;mouse_event&quot;, UInt, np, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
    DllCall(&quot;Sleep&quot;, UInt, 40) 
  DllCall(&quot;mouse_event&quot;, UInt, op, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить правую кнопку мыши
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
if MoveOFF
      DllCall(&quot;mouse_event&quot;, uint, 1, int, x, int, y, uint, 0, int, 0) ; для основного оружия движение мыши

DllCall(&quot;mouse_event&quot;, UInt, n, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать левую кнопку мыши
     ; Sleep, Time      ; первая задержка
DllCall(&quot;Sleep&quot;, UInt, Time)
DllCall(&quot;mouse_event&quot;, UInt, o, Int, 0, Int, 0, UInt, 0, Int, 0)  ; отпустить левую кнопку мыши
   ; Sleep, Timee    ;   первая задержка
DllCall(&quot;Sleep&quot;, UInt, Timee)
if MoveON

  DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, z, uint, 0, int, 0) ; для второстипенного оружия
If stop
DllCall(&quot;Sleep&quot;, UInt, 40)
}
DllCall(&quot;mouse_event&quot;, UInt, np, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
   DllCall(&quot;Sleep&quot;, UInt, 40)
 DllCall(&quot;mouse_event&quot;, UInt, op, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить правую кнопку мыши
return

Save: ; сохранение
Gui Submit, NoHide

 FileSelectFile, SelectedFile, S24, , Сохранить макрос, *.ini

  IniWrite, %DllCall3%, %SelectedFile%.ini, xdirectory, dir3 

   IniWrite, %DllCall1%, %SelectedFile%.ini, ydirectory, dir1 

IniWrite, %DllCall2%, %SelectedFile%.ini, sldirectory, dir2 


  FileDelete, .ini

Return

Open: ; загрузить ранее сохранённый макрос

 Gui Submit, NoHide

  FileSelectFile, SelectedFile, 24, , Загрузить макрос, *.ini
  
   IniRead, OutputVar3, %SelectedFile%, xdirectory, dir3, %A_Space%

  IniRead, OutputVar1, %SelectedFile%, ydirectory, dir1, %A_Space%

IniRead, OutputVar2, %SelectedFile%, sldirectory, dir2, %A_Space%


  GuiControl,, DllCall3, % OutputVar3

   GuiControl,, DllCall1, % OutputVar1

  GuiControl,, DllCall2, % OutputVar2

Return

OK:  
Gui Submit, NoHide
     np := 0
op := 0
     n := 0
o := 0
Time :=   DllCall2
Timee :=   DllCall2
  y := DllCall3
 x := DllCall1
z := DllCall4
Suspend, Off

Return
GuiClose:
ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Tue, 31 Jan 2017 01:38:30 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111670#p111670</guid>
		</item>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111655#p111655</link>
			<description><![CDATA[<p>Спасибо, подскажите как можно самому подбирать значения, менял mouseXY(move, move1) работало только на 1/4 экрана.</p>]]></description>
			<author><![CDATA[null@example.com (wowo)]]></author>
			<pubDate>Mon, 30 Jan 2017 11:22:39 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111655#p111655</guid>
		</item>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111646#p111646</link>
			<description><![CDATA[<p>Как то так.</p><div class="codebox"><pre><code>mouseXY(x, y){
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
}

strafe(left){
moveCount := 15
sleepInterval := 2
relativeMove := 93
if(left){
key := &quot;a&quot;
move := -relativeMove
move1 := -relativeMove
} else {
key := &quot;d&quot;
move := relativeMove
move1 := relativeMove
}
Send, {Blind}{%key% down}
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, 5)
Loop, %moveCount% {
mouseXY(move, move1)
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, sleepInterval)
}
Send, {Blind}{%key% up}
}

*XButton1::
while getkeystate(&quot;XButton1&quot;,&quot;P&quot;) {
strafe(false)
strafe(true)
}
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Sun, 29 Jan 2017 19:30:42 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111646#p111646</guid>
		</item>
		<item>
			<title><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111605#p111605</link>
			<description><![CDATA[<p><span style="color: green"><strong>wowo</strong><br />Переименуйте заголовок в соответствии с техзаданием (на русском языке).</span></p><p><span style="color: green"><strong>Добавлено:</strong> Слова &quot;стрейф&quot; в русском языке нет. Про транслитерацию речь не идёт.<br />Следует описать ключевую часть техзадания в заголовке. Заголовок начинается с заглавной буквы.</span></p><p><span style="color: green"><strong>Добавлено:</strong> Так годится.</span></p>]]></description>
			<author><![CDATA[null@example.com (Flasher)]]></author>
			<pubDate>Sat, 28 Jan 2017 08:47:05 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111605#p111605</guid>
		</item>
		<item>
			<title><![CDATA[Реверсивное движение курсора]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=111604#p111604</link>
			<description><![CDATA[<p>Здравствуйте, помогите изменить скрипт так, чтобы курсор мог двигаться не только по горизонтали, например под углом 45 градусов, заранее спасибо.<br /></p><div class="codebox"><pre><code>mouseXY(x, y){
DllCall(&quot;mouse_event&quot;,uint,1,int,x,int,y,uint,0,int,0)
}

strafe(left){
moveCount := 15
sleepInterval := 2
relativeMove := 93
if(left){
key := &quot;a&quot;
move := -relativeMove
} else {
key := &quot;d&quot;
move := relativeMove
}
Send, {Blind}{%key% down}
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, 5)
Loop, %moveCount% {
mouseXY(move, 0)
DllCall(&quot;Sleep&quot;, &quot;UInt&quot;, sleepInterval)
}
Send, {Blind}{%key% up}
}

*XButton1::
while getkeystate(&quot;XButton1&quot;,&quot;P&quot;) {
strafe(false)
strafe(true)
}
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (wowo)]]></author>
			<pubDate>Sat, 28 Jan 2017 08:40:11 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=111604#p111604</guid>
		</item>
	</channel>
</rss>
