<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Не существует выражение #IF]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=11658&amp;type=atom" />
	<updated>2016-06-02T17:00:16Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=11658</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104617#p104617" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>key20=1

#if key20 and GetKeyState(&quot;CapsLock&quot;, &quot;T&quot;)
F1::
	while GetKeyState(&quot;F1&quot;,&quot;P&quot;)
	tooltip Тест		
#if</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alectric]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26027</uri>
			</author>
			<updated>2016-06-02T17:00:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104617#p104617</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104616#p104616" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>key20 = 1 

Hotkey, IF, GetKeyState(&quot;CapsLock&quot;`, &quot;T&quot;)
if key20 = 0
	Hotkey, F1, Off
if key20 = 1
	Hotkey, F1, On
Hotkey, IF

#IF GetKeyState(&quot;CapsLock&quot;, &quot;T&quot;)
F1::
	while GetKeyState(&quot;F1&quot;,&quot;P&quot;)
		MsgBox Тест
#IF</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-02T16:57:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104616#p104616</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104615#p104615" />
			<content type="html"><![CDATA[<p>Я дико извиняюсь. А что по моему вопросу?</p>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-06-02T16:54:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104615#p104615</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104606#p104606" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Хотя это не совсем верно, ведь это последний параметр.</p></blockquote></div><p><a href="https://autohotkey.com/boards/viewtopic.php?f=14&amp;t=18550">Написал</a> им вчера в багрепорт.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-02T13:59:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104606#p104606</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104602#p104602" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>Hotkey, IF, InStr(&quot;a&quot;`, &quot;a&quot;)</code></pre></div><p><strong>Hotkey</strong>, If [, Expression]<br />FoundPos := <strong>InStr(</strong>Haystack, Needle [, CaseSensitive = false, StartingPos = 1, Occurrence = 1]<strong>)</strong></p><p>Видимо, выражение InStr(&quot;a&quot;`, &quot;a&quot;) рассматривается программой не как параметр, а как отдельная команда, &quot;приклеенная&quot; к команде <strong>Hotkey</strong>.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2016-06-02T09:59:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104602#p104602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104600#p104600" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Справка - Скрипты - Escape-последовательности пишет:</cite><blockquote><p>Так как в языке AutoHotkey запятые и знаки процента имеют специальное значение, то чтобы задать буквальные запятую и знак процента, используется знак акцента `. Исключениями из этого правила являются команда MsgBox, где в экранировании запятых нет необходимости, и <strong>запятые в последнем параметре любой команды - их также не нужно экранировать</strong>.</p></blockquote></div><p>Хотя это не совсем верно, ведь это последний параметр.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-02T09:25:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104600#p104600</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104598#p104598" />
			<content type="html"><![CDATA[<p>Ага, точно. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-01T20:23:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104598#p104598</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104595#p104595" />
			<content type="html"><![CDATA[<p>Точно, а ведь это азы, про запятые в параметрах команд. Значит вопрос снят.</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-01T20:19:27Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104595#p104595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104592#p104592" />
			<content type="html"><![CDATA[<p>Нужно экранировать:<br /></p><div class="codebox"><pre><code>#IF InStr(&quot;a&quot;, &quot;a&quot;)
#IF 
Hotkey, IF, InStr(&quot;a&quot;`, &quot;a&quot;)
Hotkey, 1, Label
Hotkey, IF
Return

Label:
	MsgBox  
	Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-06-01T19:30:05Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104592#p104592</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104590#p104590" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Похоже на баг.</p></blockquote></div><p>Надо <strong>Lexikos</strong>`у задать вопрос, почему так:<br /></p><div class="codebox"><pre><code>#IF InStr(&quot;a&quot;, &quot;a&quot;)
#IF 
Hotkey, IF, InStr(&quot;a&quot;, &quot;a&quot;)
Hotkey, 1, Label
Hotkey, IF
Return

Label:
	MsgBox  
	Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-01T18:49:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104590#p104590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104538#p104538" />
			<content type="html"><![CDATA[<p>Так что тему можно переименовать в &quot;Не существует выражение #IF&quot;</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-01T12:32:50Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104538#p104538</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104536#p104536" />
			<content type="html"><![CDATA[<p>Похоже на баг.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-01T12:32:34Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104536#p104536</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104535#p104535" />
			<content type="html"><![CDATA[<p>Можно так, что интересно если попробовать передать параметры &quot;CapsLock&quot;, &quot;T&quot; в StateCapsLock, то тоже самое, причём точно известно в что некоторых случаях с пользовательскими функциями и с параметрами всё прекрасно работает. Со встроенными функциями уже давно заметил конфликты в том числе и у самой директивы #IF.<br /></p><div class="codebox"><pre><code>key20 = 1

Hotkey, IF, StateCapsLock()
if key20 = 0
	Hotkey, F1, Off
if key20 = 1
	Hotkey, F1, On
Hotkey, IF

#IF StateCapsLock()
F1::
	while GetKeyState(&quot;F1&quot;,&quot;P&quot;)
		MsgBox Тест
#IF

StateCapsLock() { 
	Return GetKeyState(&quot;CapsLock&quot;, &quot;T&quot;)
}
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2016-06-01T12:28:08Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104535#p104535</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104534#p104534" />
			<content type="html"><![CDATA[<p><strong>serzh82saratov</strong><br />Понятно, хотя нет не понятно, ну буду ждать. Пока сделал вот так.<br /></p><div class="codebox"><pre><code>key20 = 1

if key20 = 0
	Hotkey, F1, Off
if key20 = 1
	Hotkey, F1, On
	
F1::
GetKeyState, state, CapsLock, T
	IF state = D
	MsgBox Тест		

Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Sgy-x2]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32753</uri>
			</author>
			<updated>2016-06-01T12:16:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104534#p104534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не существует выражение #IF]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=104533#p104533" />
			<content type="html"><![CDATA[<p>Кстати, да. Может, я туплю, но не смог заставить работать такой простой вариант:<br /></p><div class="codebox"><pre><code>Hotkey, If, GetKeyState(&quot;CapsLock&quot;, &quot;T&quot;)
Hotkey, F1, Off
Return

#If, GetKeyState(&quot;CapsLock&quot;, &quot;T&quot;)
F1:: MsgBox
#If</code></pre></div><p>У кого-то есть идеи?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-06-01T12:09:18Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=104533#p104533</id>
		</entry>
</feed>
