<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: активация и деактивация скрипта по зажатии Lbutton.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17895&amp;type=atom" />
	<updated>2023-07-31T18:04:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17895</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: активация и деактивация скрипта по зажатии Lbutton.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158926#p158926" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>vladimir_smirnov пишет:</cite><blockquote><p>я хочу что-бы он работал только лишь при зажатой Lbutton</p></blockquote></div><p>Дело в том, что и сейчас не особо понятно, как оно у вас работает. Примерно половина кода скорее всего лишняя, отступы отсутствуют, чёрт ногу сломит. Что за метка с названием return, которая в свою очередь запускает метку init? Сразу запускать init никак нельзя? <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Вы бы привели какой-нибудь простенький код для примера, чтобы не нужно было разбираться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-07-31T18:04:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158926#p158926</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: активация и деактивация скрипта по зажатии Lbutton.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=158925#p158925" />
			<content type="html"><![CDATA[<p>Всех приветсвую. <br />Дело в том, что у меня есть скрипт по поиску цвета, все работает, но дело в том, что я хочу что-бы он работал только лишь при зажатой Lbutton, причем&nbsp; сама клавиша должна работать, то-есть Lbutton должна кликаться. <br /></p><div class="codebox"><pre><code>  init:
#NoEnv
#SingleInstance, Force
#Persistent
#InstallKeybdHook
#UseHook
#KeyHistory, 0
#HotKeyInterval 1
#MaxHotkeysPerInterval 127
version = 1.1
traytip, Compiled-Aimbot-.[censored].net%version%, Running in background!, 200000, 200000
Menu, tray, NoStandard
Menu, tray, Tip, Sharpshooter %version%
Menu, tray, Add, Sharpshooter %version%, return
Menu, tray, Add
Menu, tray, Add, Help, info
Menu, tray, Add, Exit, exit
SetKeyDelay,-1, 1
SetControlDelay, -1
SetMouseDelay, -1
SetWinDelay,-1
SendMode, InputThenPlay
SetBatchLines,-1
ListLines, Off
CoordMode, Pixel, Screen, RGB
CoordMode, Mouse, Screen
PID := DllCall(&quot;GetCurrentProcessId&quot;)
Process, Priority, %PID%, High
 
EMCol := 0xD82A22
ColVn := 65
AntiShakeX := (A_ScreenHeight // 360)
AntiShakeY := (A_ScreenHeight // 128)
ZeroX := (A_ScreenWidth // 2)
ZeroY := (A_ScreenHeight // 2)
CFovX := (A_ScreenWidth // 8)
CFovY := (A_ScreenHeight // 64)
ScanL := ZeroX - CFovX
ScanT := ZeroY
ScanR := ZeroX + CFovX
ScanB := ZeroY + CFovY
NearAimScanL := ZeroX - AntiShakeX
NearAimScanT := ZeroY - AntiShakeY
NearAimScanR := ZeroX + AntiShakeX
NearAimScanB := ZeroY + AntiShakeY
 
Loop, {
KeyWait, LButton, D
PixelSearch, AimPixelX, AimPixelY, NearAimScanL, NearAimScanT, NearAimScanR, NearAimScanB, EMCol, ColVn, Fast RGB
if (!ErrorLevel=0) {
loop, 50000000 {
PixelSearch, AimPixelX, AimPixelY, ScanL, ScanT, ScanR, ScanB, EMCol, ColVn, Fast RGB
AimX := AimPixelX - ZeroX
AimY := AimPixelY - ZeroY
DirX := -1
DirY := -1
If ( AimX &gt; 0 ) {
DirX := 1
}
If ( AimY &gt; 0 ) {
DirY := 1
}
AimOffsetX := AimX * DirX
AimOffsetY := AimY * DirY
MoveX := Floor(( AimOffsetX ** ( 1 / 2 ))) * DirX
MoveY := Floor(( AimOffsetY ** ( 1 / 2 ))) * DirY
DllCall(&quot;mouse_event&quot;, uint, 1, int, MoveX * 1.2, int, MoveY, uint, 0, int, 0)
}
}
}
 
Pause:: pause
return:
goto, init
 
info:
msgbox, 0, %version%, Made by Ult.Devs edited by Logi @ slut.io`nFortnite must be running in borderless windowed mode.`nPress pause key to pause this program.`nLeft click automatically aims down target near the center of the screen.`nRecommended for near distance(~15m) and full-auto weapons.
return
 
exit:
exitapp
alt::pause  </code></pre></div>]]></content>
			<author>
				<name><![CDATA[vladimir_smirnov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43242</uri>
			</author>
			<updated>2023-07-31T09:56:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=158925#p158925</id>
		</entry>
</feed>
