<?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=13295&amp;type=atom" />
	<updated>2017-12-12T15:25:23Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=13295</id>
		<entry>
			<title type="html"><![CDATA[Re: Бинд переменной.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=122201#p122201" />
			<content type="html"><![CDATA[<p>Справка → Клавиатура → Hotkey.</p>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-12-12T15:25:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=122201#p122201</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Бинд переменной.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=122194#p122194" />
			<content type="html"><![CDATA[<p>Здравствуйте столкнулся с тем что мне необходимо забиндить переменную. <br />Выглядит это следующим образом:<br />Человек запускает скрипт и выбирает из списка клавишу на которую бы хотел назначить бмнд. И скрипт превасходно работает, <strong>НО</strong> это не так) Я пробовал сделать это через гуи и переменную, но ничего не получилось. Так как переменную он биндить не хочет.<br />Вот так выглядит код с гуи и переменной:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#NoEnv
#Persistent
#KeyHistory, 0
#HotKeyInterval -1
#MaxHotkeysPerInterval 200
#InstallKeybdHook
#SingleInstance, Force
SetKeyDelay 0
SetMouseDelay, 0
#Persistent
SetBatchLines, -1
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen

FileInstall, C:\Users\Tom\Desktop\Скрипты\1\Вторичка\Screenshot_14.png, %A_temp%\Screenshot_14.png

Gui, Font, S15 CDefault Bold, Verdana
Gui, Add, Text, x122 y9 w230 h30 , Выберите клавишу
Gui, Add, ListBox, x12 y49 w450 h254 vList AltSubmit, ListBox|Space||Rbutton|MButton|v|c|b|n|LAlt|LControl|LCtrl|LShift|
Gui, Add, Button, x187 y319 w100 h30 gOK, ОК
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h379 w479, New GUI Window
Return

GuiClose:
ExitApp
Return

ok:
gui submit

Bind := 0

if list = 1
msgbox, Это не клавиша,перезапустите скрипт и выберите другую клавишу!
if list = 2
Bind = sc39
msgbox, %bind% скан-код клавиши &quot;Space&quot;
if list = 3
msgbox, 3

%bind%::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return

*~sc3B::
Suspend
Return</code></pre></div></div></div><p>А вот немного другой вариант, где по идеи должны меняться бинды от выбора пользователя, но этого не происходит всегда активируется все бинды, но корректно работает&nbsp; &nbsp;только &quot;ПРОБЕЛ&quot;:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#NoEnv
#Persistent
#KeyHistory, 0
#HotKeyInterval -1
#MaxHotkeysPerInterval 200
#InstallKeybdHook
#SingleInstance, Force
SetKeyDelay 0
SetMouseDelay, 0
#Persistent
SetBatchLines, -1
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen

FileInstall, C:\Users\Tom\Desktop\Скрипты\1\Вторичка\Screenshot_14.png, %A_temp%\Screenshot_14.png

Gui, Font, S15 CDefault Bold, Verdana
Gui, Add, Text, x122 y9 w230 h30 , Выберите клавишу
Gui, Add, ListBox, x12 y49 w450 h254 vList AltSubmit, ListBox|Space||Rbutton|MButton|v|c|b|n|LAlt|LControl|LCtrl|LShift|
Gui, Add, Button, x187 y319 w100 h30 gOK, ОК
; Generated using SmartGUI Creator 4.0
Gui, Show, x127 y87 h379 w479, New GUI Window
Return

GuiClose:
ExitApp
Return

ok:
gui submit

if list = 1
msgbox, Это не клавиша,перезапустите скрипт и выберите другую клавишу!
;exitapp
if list = 2
{
msgbox, Ускорение активированно на &quot;Space&quot;
Space::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 3
{
msgbox, Ускорение активированно на &quot;Rbutton&quot;
Rbutton::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 4
{
msgbox, Ускорение активированно на &quot;MButton&quot;
MButton::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 5
{
msgbox, Ускорение активированно на &quot;v&quot;
sc2F::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 6
{
msgbox, Ускорение активированно на &quot;c&quot;
sc2E::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 7
{
msgbox, Ускорение активированно на &quot;b&quot;
sc30::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 8
{
msgbox, Ускорение активированно на &quot;n&quot;
sc31::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 9
{
msgbox, Ускорение активированно на &quot;LAlt&quot;
LAlt::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 10
{
msgbox, Ускорение активированно на &quot;LControl&quot;
LControl::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 11
{
msgbox, Ускорение активированно на &quot;LCtrl&quot;
LCtrl::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}
if list = 12
{
msgbox, Ускорение активированно на &quot;LShift&quot;
LShift::
ImageSearch, FoundX, FoundY, 0,0, A_ScreenWidth, A_ScreenHeight, %A_temp%\Screenshot_14.png
if !ErrorLevel
{
	MouseMove, FoundX+20, FoundY-10,
	MouseClick, left
}
else
{
	
}
Return
}


*~sc3B::
Suspend
Return</code></pre></div></div></div><p>Может ли кто намекнуть что не так?)<br />Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[romzes96]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38749</uri>
			</author>
			<updated>2017-12-12T10:14:23Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=122194#p122194</id>
		</entry>
</feed>
