AutoHotkeyはホットキーへの機能の割り当てなど常駐ソフトの作成に特化したスクリプトエンジンである。 多彩なコマンドが用意されており、GUIを持ったプログラムの作成も可能。 GNU GENERAL PUBLIC LICENSE Version 2の下で配布されるフリーソフトで、C++で作られている。 公式サイト(http://www.autohotkey.com/)にて、インストーラー版とZIPアーカイブ版の2種類が配布されている。 インストーラーを実行すると、スタートメニュー、新規作成メニュー、関連付けに変更が加えられる。
詳しい特徴と機能についての紹介は AutoHotkeyを流行らせるページ → イントロダクション でされています。
Tutorial for Newbies より引用~
As a person who started using AHK having absolutely zero programming experience (never taken a class or read a book on computers in my life), I will give you my 2 cents on learning it.
I think exploring the forum works great if you have even a little bit of background in this area. If, like me, you have none, I would learn it in the following order (this is how I would do it if I had to do it over again). Razz My reasoning here is that for a person starting from scratch, you need to learn concepts before learning commands, and the forum is geared more towards commands.
First read the Tutorial, the Scripts page, and then the FAQ. Afterwards, I would recommend learning concepts in the following order:
- Hotstrings
- Hotkeys
- Mouse Clicks & Mouse HotKeys
- Variables
- Loops - especially Parsing Loops
- String commands - (e.g. StringMid, StringReplace)
- If,Else statements
- Expressions
- Arrays & Dynamic variables - (StringSplit)
- GoSub & Functions
- GUIs
- Windows Messages
- DllCall
The first 3 you will not necessarily use very often once you become proficient with the program; but they are the easiest to comprehend and implement. Everything from Variables through GUIs is what I would consider the "core" of the program that you will use repeatedly to write virtually all of your scripts with. Windows Messages and DLLCalls are the advanced techniques that are the most powerful but most complicated. The average user will probably never have the need and desire to master these two.
Of course this list is not set in stone, and you may be learning multiple items at once (for example you may want to scratch the surface of GUIs right away), but I think all of the items are important to learn about if you plan to use AHK more than a few times, and I tried to arrange them in an order that would be most logical and systematic.
When you're wondering how to accomplish a specific task in AHK, remember that most of the commands have a common naming scheme to identify what they do. For example:
Commands dealing with files start with File.
Commands dealing with windows start with Win.
Commands dealing with text start with String.Similarly:
Commands that retrieve data from somewhere contain Get.
Commands that apply data to somewhere contain Set.Combining the two previous structures, we have commands like:
FileGetSize - Retrieve the size of a file.
WinGetTitle - Retrieve the title of a window.
StringGetPos - Retrieve the position of a piece of text inside a larger piece (like a sentence in a paragraph).FileSetTime - Apply a new Time Stamp to a file.
WinSetTitle - Apply a new title to a window.
SetTimer - Apply a new Timer, which is a command or group of commands that run at timed intervals.Good Luck, and remember that nobody was born knowing any of this. It takes time.
_________________
~引用ここまで
Original Post by jaco0646
いずれ日本語にも翻訳され、どこかで公開される事でしょう。それまでは翻訳サービス等利用するなりして下さい。
引用しっぱなしで終わり、というのも乱暴すぎる気がするので、上記の引用文中の序列リスト(番号付きリスト)の部分についてだけ、 AutoHotkeyを流行らせるページ さんで対応しているであろうページを紹介してみます。
多分、最初は AutoHotkeyを流行らせるページ さんのトップページを上から順に見ていく事と思いますが、 スクリプトを自分で書くようになるにはスクリプトの概要を理解する目的で スクリプト仕様 のページを繰り返し読むことになるかと思います。
if とか for とか loop とかさっぱり分からない、って人は Wikipediaの記事*1や オヌヌメサイト > その他参考等のページ などを参考にするとか、もっと直感的なツールは無いの?って人にはScratch*2 などから(あくまで制御構造の理解を目的として)始めてみるのもいいのかもしれません。
ホットキーへの機能の割り当て以外に、GUIがあり、DllCall*3がかなり強力な事もあり(向き不向きはありますが)大抵の事は出来ると思います。
COM*4を利用する事も出来ます。
Q:「~AチЯ㌔荏柿義形港餐汁秦疏蛋伝覗描冒輿倭兪啻嫣彖拜杼歔」を含む文字列がうまく扱えないよ A:これらの文字の2バイト目が、AHKのエスケープ文字である0x60[`]なため。 対処としてはこれらの文字の"直後"に「`」を記述する(例:「線形`代数」)か、 #EscapeCharでエスケープ文字を別のものに変えるべし。
- [`] は アポストロフィ では無く back quote(バッククォート) or backtick または グレイヴ・アクセント or アクサングラーブ
The Class library is a toolset to add OOP (Object-Oriented Programming) to AHKClass library (OOP) - Help Thread 、 Class library (OOP) - Wish list / Bug reports thread 、 Introduction To OOP / OOP - プログラミングスレまとめ in VIP
A program to look up an enumeration constant, data type or structure defined in the Windows API, and to parse a structure, which is useful for DllCall in AHK.
→ 関数ライブラリスクリプト、#Include - AutoHotkeyを流行らせるページTwo different versions of COM.ahk are now separated into COM.zip (for AutoHotkey.exe) and COM_L.zip (for AutoHotkey_L.exe). The examples in the previous post have been updated accordingly. Now no need of explicit calls for initialization functions like COM_Init etc, and COM_Wrap/COM_Unwrap, with the new Object version.
This tutorial requires the COM Standard Library.The purpose of this tutorial is to teach the intermediate AHK user how to start using the COM Standard Library to control webpages. My goal is to provide methods for controlling webpages, similar to how the AHK Control Commands can control Windows Applications. This tutorial is going to be high level, but will provide links to those who want to dig deeper into these concepts. You don't need to have much programming experience, but I will assume you feel comfortable writing and executing AHK scripts.
ファイル名関連部分(のみ)について駄目文字対策を施した(つもりの)ものです。 文字列処理(正規表現も含む)には、依然として駄目文字等の Shift JIS を扱う際の問題が含まれています。
「あふすくりぷた」の中にある encutil.ahk に SJIS、UTF-8、UTF-16 間の相互変換関数
I "discovered" a really easy way to send (paste) Unicode characters from your script.
you must save this script as UTF-8 to make it work.
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
It retrieves the info of a DOM element under the cursor when the cursor is hovering over Internet Explorer_Server.REQUIRE COM Standard Library.
# iWebBrowser2 Learner - This tool is under major development effort due to recent interest by serious members of the forum. This is intended to eventually turn into a web simple script writer much like the packaged script recorder for other applications # iWeb Functions - Very stable well tested library the relieves the user of intimate understanding DOM, COM, or JavaScript to control a web site
;-- SciTELaunch.exe キック用 ------------ ; SciTELaunch.exeと同じディレクトリに置く EnvSet, SciTE_HOME, %A_ScriptDir% Run, %A_ScriptDir%\SciTELaunch.exe Return ; ---------------------------------------
Features: * embed autohotkey in another program * dynamically add #include type files to a running script addFile(file). Functions and labels should work fine. #Directives and Exit Routines may not work as expected. * multithreading
Rosetta Code is a programming chrestomathy site. The idea is to present solutions to the same task in as many different languages as possible, to demonstrate how languages are similar and different, and to aid a person with a grounding in one language in learning another.面白い所では Bogosort , Bubble Sort ,FizzBuzz なども掲載されている。 / Challenge: translate rosettacode - Was promoting autohotkey
Sparrow is a webserver completly written in AHK, which nativly supports AHK scrips being embedded in HTML. So called HKML files (pronounce H-Key-ML). The results are sent back to requested browser.
I just translated the source codes of AutoHotkey to support Unicode, and it can be built now. However, it might be considered to be problematic and need your helps."needs your tests and helps"