AutoHotkey

概要

AutoHotkeyを流行らせるページより~

AutoHotkeyはホットキーへの機能の割り当てなど常駐ソフトの作成に特化したスクリプトエンジンである。
多彩なコマンドが用意されており、GUIを持ったプログラムの作成も可能。
GNU GENERAL PUBLIC LICENSE Version 2の下で配布されるフリーソフトで、C++で作られている。
公式サイト(http://www.autohotkey.com/)にて、インストーラー版とZIPアーカイブ版の2種類が配布されている。
インストーラーを実行すると、スタートメニュー、新規作成メニュー、関連付けに変更が加えられる。 

詳しい特徴と機能についての紹介は AutoHotkeyを流行らせるページ → イントロダクション でされています。

スクリプト

DllCall

ホットキーへの機能の割り当て以外に、GUIがあり、DllCall*1がかなり強力な事もあり(向き不向きはありますが)大抵の事は出来ると思います。

COM

COM*2を利用する事も出来ます。

FAQ

Q.文字化け?ダメ文字?

A.

AutoHotkey スレッド part6より~
Q:「~AチЯ㌔荏柿義形港餐汁秦疏蛋伝覗描冒輿倭兪啻嫣彖拜杼歔」を含む文字列がうまく扱えないよ
A:これらの文字の2バイト目が、AHKのエスケープ文字である0x60[`]なため。
  対処としてはこれらの文字の"直後"に「`」を記述する(例:「線形`代数」)か、
  #EscapeCharでエスケープ文字を別のものに変えるべし。 

Q.コンパイルした実行ファイルがアンチウイルスソフトに怒られるんだけど?

A.Compile_AHK II を試してみて下さい(08年12月14日現在)。"No UPX"オプションがあるので、UPXで圧縮しないでコンパイルしてみて下さい。 もしかしたら改善されるかもしれません。
関連用語:実行ファイル圧縮

参考リンク

AutoHotkey - Free Mouse and Keyboard Macro Program with Hotkeys and AutoText
公式サイト
AutoHotkeyを流行らせるページ
日本に於ける総本山

スクリプト

AutoHotkey Script Showcase
代表的なスクリプト。
AutoHotkey wiki - Category:Scripts - AutoHotkey , Script Listing - AutoHotkey
目当てのスクリプト(の記事)を見つけるのにForumから検索*5して探すのが大変なら、先ずこのページにあるリンクからあたってみましょう。 - 中には古い記事もあるので記事の日付け、内容に注意。
AutoHotkeyを流行らせるページ → My Scripts
AutoHotkeyを流行らせるページの管理人さんが作成したスクリプト、ライブラリ各種。

DllCall

API Wrappers - AutoHotkey wiki
WinAPI *6にアクセス出来ます。
Windows Data Types lookup tool - Autohotkey forums
WinAPI関連:補助スクリプト
Crazy Scripting : A handy tool to lookup Win32 Constants - Autohotkey forums
WinAPI関連:補助スクリプト "W32C_R01.CSV is a listing of 11836 Constants"
Easy WinAPI - WinAPI Parser, DllCall with single hotkey - Autohotkey forums
WinAPI関連:補助スクリプト
StructParser (for C/C++ structs) - Autohotkey forums
補助スクリプト: →Known Issues - Autohotkey forums
OpenGL DllCalls - Autohotkey forums
OpenGL*7 in AHK. 関連:Zippos OpenGL - AHK 3D-Engine. - Autohotkey forums(独語)操作解説(英語)-Keys - Autohotkey forums
GDI+ standard library 1.26 by tic
GDI+ *8 :サンプル - [examples+minituts] The GDI+ Examplecodes thread

COM

COM Wrappers - AutoHotkey wiki
いくつかCOMラッパーの提供もされています。
COM Standard Library - Autohotkey forums
関数ライブラリスクリプト#Include - AutoHotkeyを流行らせるページ
Embed an Internet Explorer control in your AHK Gui via COM - Autohotkey forums
"This is a standard library for IE/WebBrowser controls."
関連:IE and Gui Browser Com Tutorial - Autohotkey forums
Windows Scripting for Autohotkey - official homepage
VBScript,JScriptの組み込み - "Embed VBScript or JScript directly in your Autohotkey programs." : Embedded Windows Scripting (VBScript & JScript) and COM - official thread in the Autohotkey forums
AutoHotkeyを流行らせるページ → My Scripts → ActiveX
WSH等で使われるActiveXObjectを扱えるようにする

ダメ文字問題対策

AutoHotkey駄目文字微対策版
物置 > AutoHotkey
1.0.47.06ベースにされたようです(08年12月25日現在)。
)文字列処理(含:正規表現)では依然駄目文字等の問題は残ります。

デバッグ あれこれ

AutoHotkeyを流行らせるページ → スクリプト → スクリプトのデバッグ
スクリプトが期待通りに動作しているかを確認するには
AutoHotkeyを流行らせるページ → リファレンス → OutputDebug
デバッガ(DebugViewなど)に文字列を出力
110.22 Ahk script Debugger 1.1.5b (line-by-line capable)
"An interactive AHk debugger"
Debugging - Autohotkey forums
Debug helper スクリプト など
Debug() [Func] - Autohotkey forums
if you're working with #Include files
function must be called from itself rather than calling from d.ahk
to show correct info for currently executing function/filename 
debugging using A_LIneNumber - Autohotkey forums
RunDebugView.ahk - DebugView を利用。
Gui, Show bug - Autohotkey forums
Trace.ahk - DebugView を利用。
DllCallDebugger Proof of Concept
Requires: LowLevel.ahk(LowLevel & dynamic code)

Tools

DebugViewDebugView for Windows - © Microsoft Corporation.
デバッグトレースを表示
使い方 - 参考:
差をつけるデバッグ術! ~ 知られざるログ出力 - プログラミング徹底解説
Dependency Walker (depends.exe) Home Page
最新版:2.2.6000が入手できる
Dependency Walker 日本語化パッチ+α - G-PROJECT
Dependency Walkerの文字化け対策 - G-PROJECT
[SMS] Dependency Walker for Win32 (Depends.exe) について
DLL Export Viewer
システム内のdll/指定したdllの関数をスキャン
Dll Export Finder
指定したディレクトリのdllの関数をスキャン
ActiveVB - ApiViewer (en)
WinAPIビューワー
COMView
PSDK付属のOleView.Exeの代替として使用できるツール
MiTeC OLE/COM Object Explorer
PSDK付属のOleView.Exeの代替として使用できるツール
SPY for Internet Explorer
実行中のInternet Explorerで発生するイベントの監視(WebBrowser control)

mini info

Beta version pre-v1.0.48: Up to 3x faster performance - Autohotkey forums
赤くは無いけど、AutoHotkey本体のBetaバージョン(pre-v1.0.48)は三倍速くなってるそうです。
Compile_AHK IICompile_AHK II - for those who compile! - Autohotkey forums
Update of 2008-11-05 以降、"No UPX"オプションが付いています。
(コンパイラそのものは公式サイトで配布されているものに標準で付いて来ます)
SciTE4AutoHotkey - メニューの日本語化and日本語入力
SciTE をAutoHotkey用に最適化された SciTE4AutoHotkey の日本語化手順。
Forum内のスレッド:SciTE4AutoHotkey - New version
SciTE4AutoHotkey v2 beta
が出てます。 - SciTE4AutoHotkey v2 - New SciTE4AHK version in the making
ironahk - Google Code
クロスプラットホーム向けに開発が進められているAutoHotkeyからのフォーク。
Forum内のスレッド:IronAHK - .NET port of AutoHotkey for Windows, Linux, Mac...
chm版リファレンス - スクリプト投稿スレ > 127
『AutoHotkeyを流行らせるページ』のHTML HELP版、 v1.0.47.00 対応。

*1 DllCall() - AutoHotkeyを流行らせるページ
*2 Component Object Model - Wikipedia
*3 エスケープ文字 - AutoHotkeyを流行らせるページ
*4 #EscapeChar - AutoHotkeyを流行らせるページ
*5 検索用スクリプトの公開もされていたりします:Quick Search for Autohotkey
*6 Windowsが提供するさまざまな機能:Windows API - Wikipedia
*7 OpenGL - Wikipedia
*8 Graphics Device Interface - Wikipedia

トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS