<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Включить выключить фрагменты в цикле посредством Checkbox]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=11574</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11574&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Включить выключить фрагменты в цикле посредством Checkbox».]]></description>
		<lastBuildDate>Fri, 13 May 2016 22:38:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Включить выключить фрагменты в цикле посредством Checkbox]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103761#p103761</link>
			<description><![CDATA[<p>Спасибо огромное всем за помощь, сам разобрался. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Вот решение через костыль.<br /></p><div class="codebox"><pre><code>*~WheelUp:: ;  активация макроса
Suspend, Off
MoveOFF := 1
Return

*~WheelDown::
MoveOFF := 0
   n := 0
o := 0
return

*~vk51::  ; Q 
MoveOFF := 0
return

vk76::  ; F7 пока сделал на кнопку
Suspend, Off
If keystroke = 
  {
    keystroke = 1 
     np := 0x08 
op := 0x010
SoundBeep, 1000
  }
Else if keystroke = 1 
  {
    keystroke =
    np := 0
op := 0
SoundBeep, 1000
  }
return

return

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

*~$LButton::

      DllCall(&quot;mouse_event&quot;, UInt, np, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
    sleep, 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;mouse_event&quot;, UInt, o, Int, 0, Int, 0, UInt, 0, Int, 0)  ; отпустить левую кнопку мыши
  Sleep, Timee    ;   первая задержка
}
DllCall(&quot;mouse_event&quot;, UInt, np, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
   sleep, 40  
 DllCall(&quot;mouse_event&quot;, UInt, op, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить правую кнопку мыши
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Fri, 13 May 2016 22:38:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103761#p103761</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Включить выключить фрагменты в цикле посредством Checkbox]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103713#p103713</link>
			<description><![CDATA[<p>Вот два скрипта слепил (криво конечно но работает) , но вот третий никак. Как раз третий скрипт должен активироваться от &quot;LButton&quot; но не должен находиться в одном цикле с теми двумя.</p><div class="codebox"><pre><code>
*~WheelUp:: ;  активация макроса
Suspend, Off
MoveOFF := 1
MoveON := 0

*~WheelDown::
MoveOFF := 0
MoveON := 0
   n := 0
o := 0
return

*~vk51::  ; Q 
MoveOFF := 0
MoveON := 1
return

vk75::  ; F6, пока сделал на кнопку
If keystroke = 
  {
    keystroke = 1 
     n := 0x02
o := 0x04
SoundBeep, 1000
  }
Else if keystroke = 1 
  {
    keystroke =
    n := 0
o := 0
SoundBeep, 1000
  }
return

; 0x02 нажать лкм
; 0x04 отпустить лкм

*~LButton::
while GetKeyState(&quot;LButton&quot;,&quot;P&quot;)
{
  If MoveOFF

DllCall(&quot;mouse_event&quot;, uint, 1, int, 2, int, 3, uint, 0, int, 0) ;  движение мыши

   DllCall(&quot;mouse_event&quot;, UInt, n, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать левую кнопку мыши

 Sleep, 25     ; первая задержка

   DllCall(&quot;mouse_event&quot;, UInt, o, Int, 0, Int, 0, UInt, 0, Int, 0)  ; отпустить левую кнопку мыши

Sleep, 20    ;   первая задержка
 
  if MoveON
 
DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint, 0, int, 0) ; движение мыши

   Sleep, 40   ; вторая задержка
}
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Thu, 12 May 2016 23:04:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103713#p103713</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Включить выключить фрагменты в цикле посредством Checkbox]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=103601#p103601</link>
			<description><![CDATA[<p>Доброго времени суток. Подскажите пожалуйста как объединить эти 3 скрипта в одном цикле , что бы они нормально работали со всеми задержками <strong>&quot;Sleep&quot;</strong> , и каждый из них можно было (вкл|выкл) посредством Checkbox. Если использовать <strong>выражение&nbsp; &quot;If&quot;</strong> то все задержки <strong>&quot;Sleep&quot;</strong> плюсуются друг к другу а это критично в этом коде. </p><p>1- Двигает курсор мыши<br /></p><div class="codebox"><pre><code>*~WheelUp:: ;  активация макроса
Suspend, Off
MoveOFF := 1
MoveON := 0
Return 

*~WheelDown::
MoveOFF := 0
MoveON := 0
return

*~vk51::  
MoveOFF := 0
MoveON := 1
return

*~$vk1::
while GetKeyState(&quot;vk1&quot;,&quot;P&quot;)
{
 If MoveOFF

DllCall(&quot;mouse_event&quot;, uint, 1, int, 2, int, 3, uint, 0, int, 0) ; Двигает курсор мыши
  Sleep, 25      ; первая задержка
    Sleep, 20    ;   первая задержка
  
if MoveON
 
DllCall(&quot;mouse_event&quot;, uint, 1, int, 0, int, 2, uint, 0, int, 0) ; Двигает курсор мыши
    Sleep, 40   ; вторая задержка
}
Return</code></pre></div><p>2- кликер<br /></p><div class="codebox"><pre><code>*~$vk1::
  while GetKeyState(&quot;vk1&quot;,&quot;P&quot;)
{
DllCall(&quot;mouse_event&quot;, UInt, 0x02, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать левую кнопку мыши

  Sleep, 23
DllCall(&quot;mouse_event&quot;, UInt, 0x04, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить левую кнопку мыши

  Sleep, 26
}
Return</code></pre></div><p>3- Нажимает отпускает правую кнопку мыши<br /></p><div class="codebox"><pre><code>*~$vk1::
 GetKeyState(&quot;vk1&quot;,&quot;P&quot;)

DllCall(&quot;mouse_event&quot;, UInt, 0x08, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
    sleep, 40
 
DllCall(&quot;mouse_event&quot;, UInt, 0x010, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить правую кнопку мыши
sleep, 4

  KeyWait, vk1
sleep, 4

DllCall(&quot;mouse_event&quot;, UInt, 0x08, Int, 0, Int, 0, UInt, 0, Int, 0) ; нажать правую кнопку мыши
      sleep, 40
  
DllCall(&quot;mouse_event&quot;, UInt, 0x010, Int, 0, Int, 0, UInt, 0, Int, 0) ; отпустить правую кнопку мыши
Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Ядрён)]]></author>
			<pubDate>Mon, 09 May 2016 20:32:24 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=103601#p103601</guid>
		</item>
	</channel>
</rss>
