カテゴリー:
ホットキー
閲覧数:317 配信日:2022-04-19 13:24
ダウンロード
AutoHotkeyの「Download Current Version」ボタンをクリックします。
インストール
1.「AutoHotkey_1.1.33.10_setup.exe」をクリックします。
2.「Express」ボタンをクリックします。
デフォルトでは下記にインストールされます。
C:\Program Files\AutoHotkey
create a script file
1.「Welcome」画面内にある「create a script file」リンクをクリックします。
Welcome...
Getting Started
Before AutoHotkey can do anything, you need to write a script telling it what to do.
To learn how, read the tutorial or dive straight in.
Basically: create a script file → add some hotkeys → run the script file.
You can also get help or find many useful scripts on our friendly discussion forum ¬.
Why am I seeing this?
You ran AutoHotkey without telling it which script file to run, and it couldn't find a script in either of the usual places.
Getting Started
Before AutoHotkey can do anything, you need to write a script telling it what to do.
To learn how, read the tutorial or dive straight in.
Basically: create a script file → add some hotkeys → run the script file.
You can also get help or find many useful scripts on our friendly discussion forum ¬.
Why am I seeing this?
You ran AutoHotkey without telling it which script file to run, and it couldn't find a script in either of the usual places.
b. How to create a script
Once you have AutoHotkey installed, you will probably want it to do stuff. AutoHotkey is not magic, we all wish it was, but it is not. So we will need to tell it what to do. This process is called "Scripting".
Text instructions:
1.Right-Click on your desktop.
2.Find "New" in the menu.
3.Click "AutoHotkey Script" inside the "New" menu.
4.Give the script a new name. It must end with a .ahk extension. For example: MyScript.ahk
5.Find the newly created file on your desktop and right-click it.
6.Click "Edit Script".
7.A window should have popped up, probably Notepad. If so, SUCCESS!
So now that you have created a script, we need to add stuff into the file. For a list of all built-in commands, function and variables, see section 5.
Here is a very basic script containing a hotkey which types text using the Send command when the hotkey is pressed:
^j::
Send, My First Script
return
S↓
We will get more in-depth later on. Until then, here's an explanation of the above code:
◦The first line: ^j:: is the hotkey. ^ means Ctrl, j is the letter J. Anything to the left of :: are the keys you need to press.
◦The second line: Send, My First Script is how you send keystrokes. Send is the command, anything after the comma (,) will be typed.
◦The third line: return. This will become your best friend. It literally stops code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.
8.Save the File.
9.Double-click the file/icon in the desktop to run it. Open notepad or (anything you can type in) and press Ctrl and J.
10.Hip Hip Hooray! Your first script is done. Go get some reward snacks then return to reading the rest of this tutorial.
For a video instruction, watch Install and Hello World ¬ on YouTube.
Once you have AutoHotkey installed, you will probably want it to do stuff. AutoHotkey is not magic, we all wish it was, but it is not. So we will need to tell it what to do. This process is called "Scripting".
Text instructions:
1.Right-Click on your desktop.
2.Find "New" in the menu.
3.Click "AutoHotkey Script" inside the "New" menu.
4.Give the script a new name. It must end with a .ahk extension. For example: MyScript.ahk
5.Find the newly created file on your desktop and right-click it.
6.Click "Edit Script".
7.A window should have popped up, probably Notepad. If so, SUCCESS!
So now that you have created a script, we need to add stuff into the file. For a list of all built-in commands, function and variables, see section 5.
Here is a very basic script containing a hotkey which types text using the Send command when the hotkey is pressed:
^j::
Send, My First Script
return
S↓
We will get more in-depth later on. Until then, here's an explanation of the above code:
◦The first line: ^j:: is the hotkey. ^ means Ctrl, j is the letter J. Anything to the left of :: are the keys you need to press.
◦The second line: Send, My First Script is how you send keystrokes. Send is the command, anything after the comma (,) will be typed.
◦The third line: return. This will become your best friend. It literally stops code from going any further, to the lines below. This will prevent many issues when you start having a lot of stuff in your scripts.
8.Save the File.
9.Double-click the file/icon in the desktop to run it. Open notepad or (anything you can type in) and press Ctrl and J.
10.Hip Hip Hooray! Your first script is done. Go get some reward snacks then return to reading the rest of this tutorial.
For a video instruction, watch Install and Hello World ¬ on YouTube.
3.スクリプトを作成します。
今回は「ctrlv.ahk」ファイル」を作成後、デスクトップへ配置しました。