Today is an InputBox function that is useful for creating macros with Auto Hotkey. The input box is a function that the input window appears, where the contents of the macro can be changed with the input value, and it can be applied in a flexible manner such as changing the operation mode.
Auto Hotkey Input Box Examples and Explanations
This is the simplest and most basic way to use an input box.
InputBox,InputText,BoxName
MsgBox %InputText%
first
Then the text in the message box
However, this method flips variable values when the corresponding AutoHockey file containing the code is turned off. Because of this, there is an application method to store text documents at specific locations.
InputBox,InputText,BoxName
FileAppend,%InputText%,C:\InputSave.txt
like this
However, if you use this method, every time you write the contents in the input box, you will continue to write to the previous text. If you want to clear the previous text and save it as a new value each time, you can write the code as follows.
InputBox,InputText,BoxName
FileDelete,C:\InputSave.txt
FileAppend,%InputText%,C:\InputSave.txt
Immediately
Finally, this is an example that actually loads the values stored in the text document.
FileRead,InputText,C:\InputSave.txt Clipboard=%InputText%
Like this
With these methods, you can freely save a document or variable in the input box, link it to a macro, or save and recall text. Put the numbers in the input box,