<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Реверсивное движение курсора]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12376&amp;type=atom" />
	<updated>2017-01-31T21:00:14Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12376</id>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111733#p111733" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-01-31T21:00:14Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111733#p111733</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111682#p111682" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[wowo]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34573</uri>
			</author>
			<updated>2017-01-31T10:08:21Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111682#p111682</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111670#p111670" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-01-31T01:38:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111670#p111670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111655#p111655" />
			<content type="html"><![CDATA[<p>Спасибо, подскажите как можно самому подбирать значения, менял mouseXY(move, move1) работало только на 1/4 экрана.</p>]]></content>
			<author>
				<name><![CDATA[wowo]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34573</uri>
			</author>
			<updated>2017-01-30T11:22:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111655#p111655</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111646#p111646" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Ядрён]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=30092</uri>
			</author>
			<updated>2017-01-29T19:30:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111646#p111646</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111605#p111605" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2017-01-28T08:47:05Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111605#p111605</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Реверсивное движение курсора]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=111604#p111604" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[wowo]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34573</uri>
			</author>
			<updated>2017-01-28T08:40:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=111604#p111604</id>
		</entry>
</feed>
