<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Соединение клавиши скрипта с Hotkey в gui]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=12953</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12953&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Соединение клавиши скрипта с Hotkey в gui».]]></description>
		<lastBuildDate>Mon, 28 Aug 2017 10:31:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Соединение клавиши скрипта с Hotkey в gui]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118836#p118836</link>
			<description><![CDATA[<div class="codebox"><pre><code>PathIni = IniFile.ini
IniRead, MyGuiHotkey, % PathIni, Section, MyGuiHotkey, % A_Space
Hotkey, % PrSetSuspend := MyGuiHotkey, Suspend, UseErrorLevel

FileInstall, RJeh8poXO98.jpg, C:\Users\User\Desktop\RJeh8poXO98.jpg
Gui, Add, Picture, x-88 y-40 w600 h490 , C:\Users\User\Desktop\RJeh8poXO98.jpg
Gui, Font, S16 Cblue, Verdana
Gui, Add, Text, x142 y10 w190 h30 BackgroundTrans, Введите клавишу
Gui, Add, Hotkey, x62 y40 w300 h30 gSetSuspend vMyGuiHotkey, %MyGuiHotkey%
; Generated using SmartGUI Creator for SciTE
Gui, Show, w479 h379, Зажим
Return

SetSuspend:
	Hotkey, % PrSetSuspend, Off, UseErrorLevel
	GuiControlGet, Hotkey, %A_Gui%:, %A_GuiControl% 
	Hotkey := FormatHotkey(Hotkey)  
	Hotkey, % PrSetSuspend := Hotkey, Suspend 
	IniWrite, % Hotkey, % PathIni, Section, % A_GuiControl
	Return

Suspend:
	Suspend
	Return

LButton::
   While GetKeyState(&quot;LButton&quot;, &quot;P&quot;)
   {
      SendInput, {Click}
      Sleep, 0
   }
   Return

FormatHotkey(Hotkey) {   ; http://forum.script-coding.com/viewtopic.php?pid=102089#p102089
	RegExMatch(Hotkey, &quot;S)^([\^\+!]*)(.*?)$&quot;, K)
	If (StrLen(K2) = 1)
		Return K1 . Format(&quot;sc{:X}&quot;, GetKeySC(K2))
	Return Hotkey
} </code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Mon, 28 Aug 2017 10:31:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118836#p118836</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Соединение клавиши скрипта с Hotkey в gui]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=118834#p118834</link>
			<description><![CDATA[<p>Я прошу мне помочь.<br />Текст скрипта:<br /></p><div class="codebox"><pre><code>LButton::
   While GetKeyState(&quot;LButton&quot;, &quot;P&quot;)
   {
      SendInput, {Click}
      Sleep, 0
   }
   Return
1::Suspend</code></pre></div><p>Текст GUI:<br /></p><div class="codebox"><pre><code>FileInstall, RJeh8poXO98.jpg, C:\Users\User\Desktop\RJeh8poXO98.jpg
Gui, Add, Picture, x-88 y-40 w600 h490 , C:\Users\User\Desktop\RJeh8poXO98.jpg
Gui, Font, S16 Cblue, Verdana
Gui, Add, Text, x142 y10 w190 h30 BackgroundTrans, Введите клавишу
Gui, Add, Hotkey, x62 y40 w300 h30 ,
Gui, Add, Button, x162 y80 w120 h30, ОК
; Generated using SmartGUI Creator for SciTE
Gui, Show, w479 h379, Зажим
return
GuiClose:
ExitApp</code></pre></div><p>Я хочу сделать так что бы при запуске срипта и при смене HotKey изменял и цифра включающая Suspend и отключающая его же. Изначально стоит 1. Очень прошу помочь.</p>]]></description>
			<author><![CDATA[null@example.com (aktor311)]]></author>
			<pubDate>Mon, 28 Aug 2017 09:58:41 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=118834#p118834</guid>
		</item>
	</channel>
</rss>
