<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Ошибка Error:  Unexpected "}"]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=17615&amp;type=atom" />
	<updated>2023-02-23T13:43:16Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=17615</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Ошибка Error:  Unexpected "}"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=156903#p156903" />
			<content type="html"><![CDATA[<p>Спасибо,решено.</p>]]></content>
			<author>
				<name><![CDATA[pashasv341]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=43022</uri>
			</author>
			<updated>2023-02-23T13:43:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=156903#p156903</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Ошибка Error:  Unexpected "}"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=156902#p156902" />
			<content type="html"><![CDATA[<p><strong>pashasv341</strong><br />В выражениях <em>if ErrorLevel = 0</em> часть после <em>if</em> возьмите в круглые скобки, либо открывающую фигурную скобку перенесите на новую строку.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-02-23T13:17:16Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=156902#p156902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Ошибка Error:  Unexpected "}"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=156898#p156898" />
			<content type="html"><![CDATA[<p>Здравствуйте! В моём скрипте возникает ошибка:<br /> ---------------------------<br />test.ahk<br />---------------------------<br />Error:&nbsp; Unexpected &quot;}&quot;</p><p>	Line#<br />	020: }<br />	023: if ErrorLevel = 0 {<br />	024: ImageSearch,FoundYX,FoundYY,GameX,GameY,GameX + GameWidth,GameY + GameHeight,*32, D:\Test\Y.png<br />	025: if ErrorLevel = 0 {<br />	027: MouseMove,FoundYX,FoundYY<br />	028: Sleep,100<br />	029: Send,y<br />---&gt;	030: }<br />	031: }<br />	034: if ErrorLevel = 1 {<br />	035: Sleep,500<br />	036: }<br />	037: }<br />	038: Exit<br />	039: Exit</p><p>The program will exit.<br />---------------------------<br />ОК&nbsp; &nbsp;<br />---------------------------</p><br /><p>Код:</p><div class="codebox"><pre><code>#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
CoordMode, Pixel, Client
CoordMode, Mouse, Client
SetTitleMatchMode 2

; Определяем координаты левого верхнего угла игрового окна
WinGetPos, GameX, GameY, GameWidth, GameHeight, GTA:SA-MP

Loop {
  ; Ищем символ &quot;N&quot; на экране внутри игрового окна
  ImageSearch, FoundNY, FoundNY, GameX, GameY, GameX + GameWidth, GameY + GameHeight, *32, D:\Test\N.png
  if ErrorLevel = 0 {
    ; символ &quot;N&quot; найден
    MouseMove, FoundNX, FoundNY
    Sleep, 100
    Send, n
  }

  ; Ищем символ &quot;Y&quot; на экране внутри игрового окна
  if ErrorLevel = 0 {
    ImageSearch, FoundYX, FoundYY, GameX, GameY, GameX + GameWidth, GameY + GameHeight, *32, D:\Test\Y.png
    if ErrorLevel = 0 {
      ; символ &quot;Y&quot; найден
      MouseMove, FoundYX, FoundYY
      Sleep, 100
      Send, y
    }
  }

  ; Если символы не найдены, ждем некоторое время
  if ErrorLevel = 1 {
    Sleep, 500
  }
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[pashasv341]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=43022</uri>
			</author>
			<updated>2023-02-23T11:23:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=156898#p156898</id>
		</entry>
</feed>
