<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Задать действие при ошибке скрипта]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11826&amp;type=atom" />
	<updated>2016-07-22T09:03:34Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11826</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106267#p106267" />
			<content type="html"><![CDATA[<p>Вот так получилось.</p><br /><div class="codebox"><pre><code>#IfWinActive  ahk_exe uTorrent.exe
~LButton::
{
;if winactive, ahk_exe uTorrent.exe

CoordMode, Mouse, Screen
MouseGetPos, m_x, m_y, m_hw_target
SendMessage, 0x84,, ( m_y &lt;&lt; 16 )|m_x,, ahk_id %m_hw_target%
;ToolTip, % errorlevel
if errorlevel = 1
{
	
   ; MsgBox
    exitapp
}

}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[OmTatSat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33453</uri>
			</author>
			<updated>2016-07-22T09:03:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106267#p106267</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106265#p106265" />
			<content type="html"><![CDATA[<p>Дело в том, что проверка или продолжать скрипт проводится кодом.</p><div class="codebox"><pre><code>Process, Exist, uTorrent.exe</code></pre></div><p>Тогда как, если выключить uTorrent правильно нажав кнопку выход, то его процесс закроется где-то через секунды 2 после нажатия кнопки выход, и видимо в это время скрипт дальше крутится но от uTorrenta получить то что хочет не может, что можно придумать? Можно задать доп действие по нажатию кнопки выход в uTorrent?</p>]]></content>
			<author>
				<name><![CDATA[OmTatSat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33453</uri>
			</author>
			<updated>2016-07-22T07:59:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106265#p106265</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106264#p106264" />
			<content type="html"><![CDATA[<p>Возможно ли обойти ошибку такого рода?</p><div class="codebox"><pre><code>Error:  
Error code:	0x800A03EA
Source:		Ошибка компиляции Microsoft JScript
Description:	Синтаксическая ошибка
Line:		1
Column:		1
Line text:		()

	Line#
	327: pArr := ComObjValue(Body)
	328: cBytes := NumGet(pArr+0, A_PtrSize = 8? 24:16, &quot;uint&quot;)
	329: pText := NumGet(pArr+0, A_PtrSize = 8? 16:12, &quot;ptr&quot;)
	332: JsonString := StrGet(pText, cBytes, &quot;utf-8&quot;)
	333: JS := new ActiveScript(&quot;JScript&quot;)
	334: JS.eval(&quot;delete ActiveXObject; delete GetObject;&quot;)  
	335: ComObjError(false)  
---&gt;	336: obj := JS.eval(&quot;(&quot; . JsonString . &quot;)&quot;).torrents
	337: SetFormat,Float,0.1
	338: {
	343: Loop,obj.length
	344: {
	346: video := 0
	349: if reload = 1
	350: {

The thread has exited.</code></pre></div>]]></content>
			<author>
				<name><![CDATA[OmTatSat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33453</uri>
			</author>
			<updated>2016-07-22T07:41:57Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106264#p106264</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106195#p106195" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, как всегда выручаете, огромное Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[OmTatSat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33453</uri>
			</author>
			<updated>2016-07-19T20:03:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106195#p106195</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106194#p106194" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>ComObjError(false)
url := &quot;http://&quot; ip &quot;:&quot; port &quot;/gui/&quot;
global urlVlc := &quot;http://&quot; ip &quot;:&quot; port &quot;/proxy&quot;
tokenUrl := url &quot;token.html&quot;
action := &quot;?list=1&quot;
HTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)
HTTP.Open(&quot;GET&quot;, tokenUrl, false)
if A_lastError
   msgbox error
HTTP.SetCredentials(user, pass, 0)
HTTP.Send()
Body := HTTP.ResponseBody</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2016-07-19T19:35:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106194#p106194</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Задать действие при ошибке скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=106193#p106193" />
			<content type="html"><![CDATA[<p>Здравствуйте, есть скрипт работающий с авторизацией, когда закрываю программу в которой скрипт авторизованно получал данные, он теряет возможность их получать и показывает сообщение с ошибкой. Как задать действие при появлении такой ошибки?</p><p>Кусок кода с помощью которого можно увидеть окно с ошибкой на которое нужно задать действие.</p><div class="codebox"><pre><code>url := &quot;http://&quot; ip &quot;:&quot; port &quot;/gui/&quot;
global urlVlc := &quot;http://&quot; ip &quot;:&quot; port &quot;/proxy&quot;
tokenUrl := url &quot;token.html&quot;
action := &quot;?list=1&quot;
HTTP := ComObjCreate(&quot;WinHTTP.WinHTTPRequest.5.1&quot;)
HTTP.Open(&quot;GET&quot;, tokenUrl, false)
HTTP.SetCredentials(user, pass, 0)
HTTP.Send()
Body := HTTP.ResponseBody</code></pre></div>]]></content>
			<author>
				<name><![CDATA[OmTatSat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33453</uri>
			</author>
			<updated>2016-07-19T18:41:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=106193#p106193</id>
		</entry>
</feed>
