<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AutoHotkey versus AutoIT]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=1321</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=1321&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AutoHotkey versus AutoIT».]]></description>
		<lastBuildDate>Thu, 27 Nov 2008 12:18:27 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AutoHotkey versus AutoIT]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=16335#p16335</link>
			<description><![CDATA[<p>В AutoIt есть одна возможность задействовать горячие клавиши:<br /></p><div class="codebox"><pre><code>HotKeySet (&quot;key&quot;[, &quot;functionname&quot;])</code></pre></div><p>В UDF присутствует функция:<br /></p><div class="codebox"><pre><code>_IsPressed($sHexKey)</code></pre></div><p>Вот, пожалуй, и всё. Никаких пропусканий хоткеев «сквозь себя», никаких «#IfWinActive/Exists», никаких hotstrings. Ну, и:<br /></p><div class="quotebox"><blockquote><p><strong><em>The following hotkeys cannot be set</em></strong>:<br /><em>Ctrl+Alt+Delete</em> It is reserved by Windows <br /><em>F12</em> It is also reserved by Windows, according to its API. <br /><em>NumPad&#039;s Enter Key</em> Instead, use {Enter} which captures both Enter keys on the keyboard. <br /><em>Win+B,D,E,F,L,M,R,U; and Win+Shift+M</em> These are built-in Windows shortcuts. Note: Win+B and Win+L might only be reserved on Windows XP and above. <br /><em>Alt, Ctrl, Shift, Win</em> These are the modifier keys themselves! <br /><em>Other</em> Any global hotkeys a user has defined using third-party software, any combos of two or more &quot;base keys&quot; such as &#039;{F1}{F2}&#039;, and any keys of the form &#039;{LALT}&#039; or &#039;{ALTDOWN}&#039;.</p></blockquote></div><p>Автор обзора - <strong>alexii</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Thu, 27 Nov 2008 12:18:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=16335#p16335</guid>
		</item>
		<item>
			<title><![CDATA[AutoHotkey versus AutoIT]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=10205#p10205</link>
			<description><![CDATA[<p><a href="http://www.autohotkey.com/">AutoHotkey</a> - это &quot;ответвление&quot; от проекта <a href="http://www.autoitscript.com/">AutoIT</a>. Языки отличаются синтаксисом и встроенным набором методов.<br />AutoIt, в отличие от AutoHotkey, поддерживает Automation (он же COM):<br /></p><div class="codebox"><pre><code>$oExcel = ObjCreate(&quot;Excel.Application&quot;)                   ; Create an Excel Object
$oExcel.Visible = 1                                        ; Let Excel show itself
$oExcel.WorkBooks.Add                                      ; Add a new workbook
$oExcel.ActiveWorkBook.ActiveSheet.Cells(1,1).Value=&quot;test&quot; ; Fill a cell
sleep(4000)                                                ;See the results for 4 seconds
$oExcel.ActiveWorkBook.Saved = 1                           ; Simulate a save of the Workbook
$oExcel.Quit                                               ; Quit Excel</code></pre></div><p>Так же, как и AHK, AutoIt поддерживает вызов функций из DLL:<br /></p><div class="codebox"><pre><code>$result = DllCall(&quot;user32.dll&quot;, &quot;int&quot;, &quot;MessageBox&quot;, &quot;hwnd&quot;, 0, &quot;str&quot;, &quot;Some text&quot;, &quot;str&quot;, &quot;Some title&quot;, &quot;int&quot;, 0)</code></pre></div><p>В последних версиях AutoIt (как и в последних версиях AutoHotkey) появилась поддержка CallBack (обратного вызова):<br /></p><div class="codebox"><pre><code>; Create callback function
$handle = DLLCallbackRegister (&quot;_EnumWindowsProc&quot;, &quot;int&quot;, &quot;hwnd;lparam&quot;)     

; Call EnumWindows
DllCall(&quot;user32.dll&quot;, &quot;int&quot;, &quot;EnumWindows&quot;, &quot;ptr&quot;, DllCallbackGetPtr($handle), &quot;lparam&quot;, 10)

; Delete callback function
DllCallbackFree($handle)

; Callback Procedure
Func _EnumWindowsProc($hWnd, $lParam)
    If WinGetTitle($hWnd) &lt;&gt; &quot;&quot; And BitAnd(WinGetState($hWnd), 2) Then
        $res = MsgBox(1, WinGetTitle($hWnd), &quot;$hWnd=&quot; &amp; $hWnd &amp; @CRLF &amp; &quot;lParam=&quot; &amp; $lParam &amp; @CRLF &amp; &quot;$hWnd(type)=&quot; &amp; VarGetType($hWnd))
        If $res = 2 Then Return 0   ; Cancel clicked, return 0 to stop enumeration
    EndIf
    Return 1    ; Return 1 to continue enumeration
EndFunc</code></pre></div><p>Подкорректирована передача по ссылке/по значению в DLL-функции:<br /></p><div class="quotebox"><blockquote><p>Changed: DllCall() new method of passing types by reference using *. <br />Changed: DllCall(): short_ptr, long_ptr, int_ptr types deprecated. Use short*, long* and int* respectively. <br />Added: DllCall() now accept doubles, int64, uint64, wparam and lparam types.</p></blockquote></div><p>Выравнивание структур при передаче:<br /></p><div class="quotebox"><blockquote><p>DllStructCreate() added &quot;align&quot; keyword to set structure alignment</p></blockquote></div><p>Наконец, в последних версиях в комплекте поставки идёт огромнейшее количество User Defined Function (в исходных кодах AutoIt), заметно облегчающих работу и упрощающих обучение языку.</p><p>AutoHotkey гораздо более заточен на работу с клавиатурой: именно в этом его огромное преимущество. Главное, чего ему не хватает - поддержки работы через Automation (COM).</p><p>Автор обзора - <strong>alexii</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Wed, 02 Apr 2008 10:37:36 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=10205#p10205</guid>
		</item>
	</channel>
</rss>
