- AutoIt It is free, simple and very powerful to automate Windows and create GUIs.
- Learn the basics with official help and reinforce them with Koda, SciTE, Au3Info, and Au3Record.
- Practice with a set of exercises and master files, loops, and functions.
- Rely on the community: search first, share code, and ask clear questions.

If you've just landed on AutoIt and don't know where to start, you've come to the right place. AutoIt is a free and lightweight language for automating Windows., create small windowed applications, and build macros that click, type, move files, or fill out forms for you. Although it's a few years old, it's still a very useful Swiss Army knife when you want to automate Windows tasks quickly without complicating your life.
In this guide, we've compiled, organized, and translated into clear language the essentials for getting started: from the basics of official help to a guided practice path with examples and a complete section on files and directories. The idea is that in a few hours you will be able to install it, understand the core of the language and start real scripts. that save you time.
What is AutoIt and what can you do with it?
AutoIt is a Windows-centric scripting language that allows you to easily create scripts and GUI (windowed) applications. Allows you to automate virtually any interaction with windows, keyboard and mouse, as well as manipulate files, processes, and services. Applications created with AutoIt look like native Windows windows, similar to Calculator or Notepad.
One of its great virtues is its ease: It is not difficult to learn if you follow a logical progression, and the help package itself includes short examples for each function, perfect for learning by seeing and playing. It's free, which makes it easy to experiment without restrictions or licenses.
In addition to interface applications, AutoIt shines with macros. A macro is a script that performs operations automatically: Opens programs, waits for windows to appear, clicks where you tap, types text, captures the screen every so often, etc. It's ideal for repetitive or testing tasks.
Will you enjoy learning it? Probably yes, if you're looking for practical results from day one. AutoIt rewards quickly: with just a few lines you make things visible and that's addictive. If you follow this step by step guide, you will have a solid foundation to continue with more ambitious projects.

Installation and tools that make your life easier
You can install AutoIt in the classic way or even use it in portable mode, depending on your preference. The recommended combo to start with is AutoIt + SciTE4AutoIt3, the editor oriented to this language that offers syntax highlighting, one-click execution, templates, snippets, and direct access to help.
To design windows without fighting with coordinates, you have Koda (the GUI designer). Koda allows you to drag and drop controls such as buttons, text boxes, lists or sliders and generates the code skeleton so you can focus on the logic. It's perfect for exercises like calculating areas, projecting vector components, or creating small games.
In the field of automation, two utilities will speed you up a lot: Au3Info and Au3Record. Au3Info shows you window titles, controls and screen coordinates to direct your clicks and keystrokes with precision, while Au3Record can record mouse and keyboard actions as the basis of a macro.
If you want to distribute your scripts, it's very easy to create standalone executables. AutoIt compiles your .au3 to .exe with built-in dependencies, so you can share them with anyone who doesn't have AutoIt installed. It's a quick way to package internal utilities or classroom projects as a "self-executing Pythagoras."

Master the basics with official help
AutoIt's help is your best ally. Go to "Tutorials" for a first look, and leave the topic of regular expressions for later. When you want to build a solid foundation, visit “Language Reference”, which explains how to handle data types, variables, macros, operators, control structures, functions and comments.
Start with how information is represented and stored: Datatypes, Variables and MacrosSystem macros (e.g., @DesktopDir, @HomeDrive, or @HomePath) save you work by referencing folders and paths belonging to the current user.
Continue with the basic operations in Operators and, very importantly, with flow control: if/else, select/case and while/for loops. They are the skeleton of any algorithm you want to build.
The functions deserve their own chapter. In “Functions” you will see how to encapsulate reusable logic and in “Comments” you will learn how to document what you do so that you or whoever helps you understands the code in a few months.
For interfaces, explore “GUI Reference”. Here's how to create windows and add controls.If you prefer to start with a step-by-step guide, there's a basic tutorial, "My First GUI," available in the Spanish-speaking community, which is very informative. For reference, you also have a keyword/command index, useful for specific queries once you know what you're looking for.
How to learn in community without dying in the attempt
The AutoIt community is a great place to get answers to any questions you may have when you're getting started. To get useful and quick answers, follow some basic rules- Search first to see if your question has already been answered, provide the piece of code where the problem occurs (preferably reduced to a minimum) and use a descriptive title that summarizes the problem.
Avoid writing “in SMS code”. A clear, spell-free text makes it easier for others to understand your question., and that translates into better responses. Remember: don't ask for the entire program; show that you've tried and will need specific help.
Another clue: In the help for each function you will find a mini example program.. Run it, modify it, break it, and put it back together. You'll learn a lot. If you'd like to go even deeper, there's a blog about it floating around the internet. PDF very extensive AutoIt guide (several hundred pages) that compiles concepts and practices.
Best Practices Roadmap: From “Hello World” to Projects with GUI, Automation, Bluetooth, and the Internet
To help you progress at a good pace, here's a practical route inspired by a comprehensive exercise index. It is organized by thematic blocks and covers everything from basic operations to integrations with AndroidYou can follow them in order or skip to the block that most motivates you.
- First steps and basic exercises: 1) portable installation and a Pythagoras-type math exercise with executable; 2) “read me” reading, Tricks and essential syntax notions; 3) Celsius/Fahrenheit converter using a while; 5) km/h ⇄ mi/h conversion with options; 6) m/s ⇄ km/h conversion with options and loop; 8) system actions (shutdown, hibernate), run apps, use MsgBox and InputBox.
- GUI Design with Koda: 9) insert controls and calculate the area of a rectangle; 10) decompose a vector into horizontal and vertical components; 11) “guess the number” game with randomness; 12) Russian roulette (random); 13) tic-tac-toe with images; 15) selector with CheckBox and Radio; 17) drop-down lists: countries and capitals; 19) calendar; 20) traffic light; 21) slider for parabolic shot; 22) slider to mix RGB colors; 23) slider to add numbers and import Koda code; 24) files: create, delete, modify and save; 25) replace strings in files; 26) Select Case and If/ElseIf; 27) For/Next and While/Wend loops; 28) phases of the moon; 29) text to speech; 30) voice recognition; 31) menu and submenu; 33) Timer with TimerInit/TimerDiff; 34) List files and folders; 35) Use 7-Zip for extraction.
- Macros and advanced automation: 40) PC installation with SciTE4AutoIt and first macros with Au3Record; 42) Building a macro on Notepad and using Au3Info; 44) Automatic mouse movement and addition in Calculator; 46) Screenshot, HotKeySet and ToolTip; 47) Detecting pressed keys with _IsPressed and displaying them in the console.
- Functions and graphs: 50) Automatic key sending with Send, control, hibernate, and capture keys with shortcuts; 52) Listing user-defined functions; 53) DLL calls; 54) Drawing squares and circles with GUICreateCtrlGraphic/GUICtrlSetGraphic; 55) More on-screen drawing; 56) Example of HotKeySet, MouseClick, ToolTip, and password handling; 57) Finding pixels by color with PixelSearch and ImageSearch; 58) Tracking the mouse and reading coordinates/colors with PixelGetColor.
- Bluetooth and Arduino: 60) Bluetooth bases; 62) sending data from the PC to the Arduino via Bluetooth; 64) sending data from the Arduino to the PC; 66) simplifying the Arduino → PC flow; 67) buttons and LEDs; 68) DHT11 sensor with graph; 68B) humidity and temperature query with DHT11; 69) data exchange with Android using App Inventor; 69B) Android ↔ computer exchange via Bluetooth; 69C) Android ↔ computer chat via Bluetooth with App Inventor; 69D) sending an image from Android to the computer via Bluetooth.
- Internet and services: 70) create, upload, download, and modify a text file on a server; 71) exercise reserved for further development; 72) select a local file and upload it; 73) download a file from the Internet and display it if it's an image; 74) send email; 75) CRUD in MySQL (upload, download, delete, view data); 78) registration and authentication with MySQL and email; 79) send data to Firebase and read it, also from a website.
- Interesting system scripts: 100) Hibernate and resume automatically; 102) Turn on/off monitor; 103) Disable Notepad buttons; 105) Manage system tray; 108) Hide/show taskbar and windows; 110) Capture screen and send via FTP; 114) Keylogger (with all legal precautions); 116) Block mouse and keyboard; 117) Other computer lock; 118) Create files in Windows Startup folder; 119) Chat over WiFi; 119B) Turn off PC via WiFi, launch Notepad and upload files to PC with App Inventor; 120) Run commands ADB on Android by USB.
- Curious scripts: 200) collection of examples seen on the internet to inspire you and learn techniques.
If you complete this tour, you will touch a good part of the AutoIt ecosystem: GUI, interface automation, files, network, databases y hardware light. The key is to practice, modify, and re-execute. until the pieces fit together.
Working with Files and Directories in AutoIt: An Essential Guide with Examples
One of the most practical areas of everyday life is file and folder management. Below is a collection of step-by-step examples for creating, moving, reading, writing, and deleting., along with file selection functions from dialog boxes.
1) Create directories
To create folders, you can use absolute paths or system macro variables like @DesktopDir. These macros give you user paths without hardcoding names.. An example:
; Crea una carpeta en C y otra en el Escritorio del usuario
DirCreate("C:/Carpeta de AutoIt/")
DirCreate(@DesktopDir & "/La carpeta de AutoIt/")
If you need to know the user profile folder, @HomeDrive and @HomePath are useful. Concatenate with & to join strings and you can display the output with MsgBox if you want to debug.
2) Delete and move directories
To delete a directory with all its contents, set the second parameter to 1; if you set it to 0, it will only be deleted if it is empty. You can move an entire tree with DirMove:
; Borrar con contenido
DirRemove("C:/Carpeta de AutoIt/", 1)
DirRemove(@DesktopDir & "/La carpeta de AutoIt/", 1)
; Mover un directorio completo
DirMove("C:/Origen/", "C:/Destino/Aqui/", 1)
3) Create an empty file (and opening modes)
When you open a file with FileOpen you define the mode: 0 reading, 1 writing and appending to the end, 2 writing replacing content. Modes 1 and 2 create the file if it does not exist:
$carpeta = "C:/Carpeta de AutoIt/"
DirCreate($carpeta)
$archivo = FileOpen($carpeta & "prueba.txt", 1) ; escritura y añadir
FileClose($archivo)
Be careful with your paths; on Windows it's common to use \, but / also works in many contexts. Cleanup on close with FileClose prevents file crashes.
4) Write text to a file
You can write lines with FileWrite or FileWriteLine. @CRLF inserts a line break. If you open with mode 1, new lines accumulate at the end:
$carpeta = "C:/Carpeta de AutoIt/"
DirCreate($carpeta)
$archivo = FileOpen($carpeta & "prueba.txt", 1)
FileWrite($archivo, "Esta es la línea 1" & @CRLF)
FileWrite($archivo, "Esta es la línea 2" & @CRLF)
FileWrite($archivo, "Esta es la línea 3" & @CRLF)
FileWriteLine($archivo, "Otra línea 4")
FileWriteLine($archivo, "Otra línea 5")
FileWriteLine($archivo, "Otra línea 6")
FileClose($archivo)
If you need to replace previous content on each run, open with mode 2. This way you avoid the file from growing unnecessarily..
5) Read part of a file
For partial reading, open in mode 0 and specify how many characters you want. FileRead accepts a second parameter with the length to read:
$carpeta = "C:/Carpeta de AutoIt/"
$archivo = FileOpen($carpeta & "prueba.txt", 0)
$texto = FileRead($archivo, 12) ; lee 12 caracteres
MsgBox(0, "Lectura", $texto)
FileClose($archivo)
6) Reading a complete file: three techniques
AutoIt allows you to read the entire file character by character, line by line, or all at once. In the first two cases @error = -1 indicates end of file.
A) Character by character with FileRead inside a loop:
$carpeta = "C:/Carpeta de AutoIt/"
$archivo = FileOpen($carpeta & "prueba.txt", 0)
$completo = ""
While 1
$letra = FileRead($archivo, 1)
$completo &= $letra
If @error = -1 Then ExitLoop
WEnd
MsgBox(0, "Archivo completo (FileRead)", $completo)
FileClose($archivo)
B) Line by line with FileReadLine and adding @CRLF to reconstruct the text. It is convenient to process records by line:
$carpeta = "C:/Carpeta de AutoIt/"
$archivo = FileOpen($carpeta & "prueba.txt", 0)
$completo = ""
While 1
$linea = FileReadLine($archivo)
$completo &= $linea & @CRLF
If @error = -1 Then ExitLoop
WEnd
MsgBox(0, "Archivo completo (FileReadLine)", $completo)
FileClose($archivo)
C) All at once with FileRead without loop. The most direct way when you only need the entire content:
$carpeta = "C:/Carpeta de AutoIt/"
$archivo = FileOpen($carpeta & "prueba.txt", 0)
$completo = FileRead($archivo)
MsgBox(0, "Archivo completo", $completo)
FileClose($archivo)
7) Delete files (and use the Trash)
To delete a file directly, use FileDelete. If you prefer to send it to the Trash, use FileRecycle, and to empty it, use FileRecycleEmpty. It is advisable to recycle in tests to avoid accidental losses.:
$carpeta = "C:/Carpeta de AutoIt/"
FileDelete($carpeta & "prueba.txt")
; A la Papelera
autoit
FileRecycle($carpeta & "prueba.txt")
FileRecycleEmpty()
8) Check if a file exists or can be opened
A quick way to check existence/permissions is to try to open and validate the handle. If FileOpen returns -1, it could not be opened or does not exist.:
$carpeta = "C:/Carpeta de AutoIt/"
$h = FileOpen($carpeta & "prueba.txt", 1)
If $h = -1 Then
MsgBox(0, "Error", "El archivo no existe o no se pudo abrir.")
Exit
EndIf
FileClose($h)
9) Copy and move files
To copy, specify the source and destination. You can construct user paths with @DesktopDir to copy to the desktop. To move, use FileMove:
$carpeta = "C:/Carpeta de AutoIt/"
FileCopy($carpeta & "prueba.txt", @DesktopDir & "/La carpeta de AutoIt/prueba.txt")
; Mover genérico
; FileMove("origen", "destino")
10) Select files and folders with dialog boxes
AutoIt provides functions for opening standard selection dialogs: FileOpenDialog, FileSaveDialog, and FileSelectFolder. They are very useful for interactive tools:
$msg = "Pulsa Ctrl o Shift para seleccionar más de uno"
$sel = FileOpenDialog($msg, "C:/Windows/", "Imágenes (*.jpg;*.bmp)", 1 + 4)
If @error Then
MsgBox(4096, "", "No hay archivos seleccionados")
Else
$sel = StringReplace($sel, "|", @CRLF)
MsgBox(4096, "", "Seleccionado:" & @CRLF & $sel)
EndIf
$doc = "::{450D8FBA-AD25-11D0-98A8-0800361B1103}"
$save = FileSaveDialog("Elige un nombre", $doc, "Scripts (*.aut;*.au3)", 3)
If @error Then
MsgBox(4096, "", "Guardado cancelado")
Else
MsgBox(4096, "", "Guardado en: " & $save)
EndIf
$carp = FileSelectFolder("Selecciona una carpeta", "", 0)
11) Use wildcards
Wildcards allow you to operate on multiple files at once. The *.* pattern recycles all files in a specific folder:
$carpeta = "C:/Carpeta de AutoIt/"
FileRecycle($carpeta & "*.*")
With this collection you can now cover most file management tasks. Add validations, logs and dialog boxes to turn it into a utility that you can use daily.
Final tips to keep moving forward
Plan your learning by combining reading and practice: review help, clone examples, modify parameters, and test in different environments. If you're interested in interfaces, focus on Koda and the GUI Reference.; if you're into automation, practice with Au3Info and HotKeySet.
When your body asks for more, explore blocks like Bluetooth + Arduino, MySQL or Firebase databases, and curious scripts. Everything adds up to becoming a resourceful person with AutoIt within your team or for your personal projects.
And if you need a little bit of a boost to stay motivated, we're bringing back a quote attributed to Mafalda (Quino): "Isn't it that in this world there are more and more people and fewer and fewer people?" Community is built by helping and sharing; when you learn something, come back and leave your contribution for the next person who comes.
This guide covers the essential points for getting started with AutoIt, links the basics with guided practice, and provides ready-to-run examples. With AutoIt you will gain speed by solving tasks in WindowsWhether through macros, small GUI applications, or utilities that manage files and services, with perseverance and curiosity, you'll go from simple to powerful without even realizing it.
Passionate writer about the world of bytes and technology in general. I love sharing my knowledge through writing, and that's what I'll do on this blog, show you all the most interesting things about gadgets, software, hardware, tech trends, and more. My goal is to help you navigate the digital world in a simple and entertaining way.