How to Automate Mundane Tasks with AutoIt

Guy McDowell 20-05-2009

autoit_logoAutoIt allows you to perform a series of actions and saves a snapshot of the actions. It’s called a macro in geek-speak. Then by simply invoking that macro, the same series of actions is taken again, identical to the first time you did it. Yet, this time all you did was click one icon. If Homer J. Simpson’s math holds true, that takes a 42-step process, reduces it to one, thus increasing productivity A Simple Productivity Guide for Everyone With all distractions that modern life brings, it's not easy to keep your productivity up. Whether you're an enthusiastic procrastinator, or just happen to have very little time at hand. Read More by 42-fold. Is that worthy of a raise?


Here’s how I used AutoIt to create a macro to run CCleaner on my laptop. Yes, something this simple could be done with Windows Scheduler Run Programs Automatically Using Windows Task Scheduler Read More , yet this is a fun entry point to creating far more complex macro scripts.

Step One: Download and Install AutoIt and AutoIt Script Editor

Just jump over to AutoIt, download the appropriate install file and begin the install. I’d recommend going for the Full Installation. It’s only 8 MB in size, so it downloads fairly quick. While you are there you will need to download the AutoIt Script Editor, as well.

Once the download is complete you can begin the process of installing it. Here’s what that will end up looking like:


Standard start install screen. Go ahead and click next.



Standard EULA. Give props to Jonathan Bennett and the AutoIt Team for this fine software. Click I Agree.


For now, you want to choose Run the script as the option. If you are already familiar with scripting, go ahead and check Edit the script. Either way, once your choice is made, click Next.



Choose where you want to install the program. C:\Program Files\AutoIt3 is the default location. Works for me! Click Install.


There it goes! Installing away…



It says that the release notes are very important. In my opinion, they are only important if you’ve been using AutoIt for awhile and you are not new to scripting in Windows. Other than that – not that important. Click Finish.

Step 2:  Installing AutoIT Script Editor

Yes, this seems like a lot of work to avoid a little work. Please stay with me on this. I’m going to show you how to do just one thing with AutoIt, but once you get into it, there’s no end to what you can automate with it. Hang in there.

Find the installer on your desktop and double-click on it.


install_scite_1Standard start an install screen. Moving on.

install_scite_2Yep, looks about right. Let’s click Next.

install_scite_3EULA, blah, blah, blah. I mean, read it carefully and cherish the amazing copywriting. Click I Agree, if you agree.

install_scite_4IT’S INSTALLING! IT’S INSTALLING!!!!!!!! Cameraman, are you getting this?


Click Finish. Take note of the Use Ctrl+F1 to get help on getting started. Annnnnnnnnd, we’re done.

Whew. Let’s get down to making a macro shall we?

Step 3: Macro Making

The trick here is to open the right program in that bunch of stuff that we just downloaded and installed. Click on Windows Start > AutoIt> SciTE> SciTE. Just like in the picture:


Now, the appropriate SciTe editor will be open. Just to make your life easier, and believe me that’s what I’m trying to do, you may want to create a shortcut to this on your desktop.

Once the SciTe editor is open, you may want to close other programs and focus on this process. Multiple windows just makes things confusing.


Once SciTE is open, click on Tools > AU3Recorder. This will open up AU3Record 3.1.


What I’m going to do is run CCleaner Best Programs to Keep Your Computer Secure Read More . Make sure to check Record Window Text and Record Mouse. Click on Browse and navigate to the ccleaner.exe file.


Double-click on it to select it. You’ll see the path shown in the Run(‘ ‘) text field.


Now you can Click to Record the tasks you want to automate.


CCleaner will open. That’s good. Now, click on Run Cleaner and wait for it to do it’s job. Then, close CCleaner.


Go back to the AU3Record window and click on Click to Stop. There! You’ve recorded your macro. Click on File > Save As and save the macro with a good name like quick_clean.au3.


Now when you want to run CCleaner, all you have to do is double click on quick_clean.au3.

Not too bad! Think of this as your “Hello World” program for AutoIt.

By doing this, you’ve just delved into the the world of Window’s Scripting. Keep going. Think of those things that are repetitive that you have to do with your computer and make the macro to suit. I used AutoIt to make an installer for LogMeIn Free that I could send to my field users. All they had to do was double-click the installer and away it went! They didn’t need to know my LogMeIn password or anything else.

You can also create an executable and obfuscate the code so it is harder for people to reverse engineer. You really want to do that if there are passwords involved.

I hope you found this tutorial useful and that you may find a place for AutoIt in your toolbox. It really is a very powerful suite of software and the price is right. Here’s the download link again. AutoIt will only work on Windows.

How do you take care of complex repetitive tasks? Let us know in the comments.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. nikhil
    April 28, 2015 at 2:34 pm


    Can we use this to for task like find links of specific products?
    for example i wish to find links of below products on amazon and paste it on excel besides product name
    1. xbox 360 one

    Can auto it handle this?

    • Guy
      April 28, 2015 at 8:11 pm


      • Stephan
        January 7, 2016 at 4:22 pm

        AutoIt can do this....

        • Guy McDowell
          January 7, 2016 at 4:43 pm

          Weird. I don't recall making that comment. I would have had to try it before I could say "Nope." and I know I didn't try it.

          Glad to hear it can though!

      • Cmnet
        April 16, 2017 at 4:16 am

        Of course you can do things like this in AutoIT! If you sit down for a while and really learn the language (especially the Internet Explorer library), you can automate things like this really easily. It may be tough in the beginning, but you'd eventually get it.

  2. Guy
    January 18, 2015 at 7:59 pm

    I'm not sure. Perhaps you can create a loop with a counter in it?

  3. Anil
    January 13, 2015 at 2:45 pm

    How can you make it repetitive? For example, I want to automate CTRL+TAB action in a program, to run every 2 seconds.

    • Stephan
      January 7, 2016 at 4:48 pm

      Below runs what you want 20 times.
      F4 will stop the program


      HotKeySet("{F4}", "ExitProg")
      Func ExitProg()
      Exit 0 ;;Exits the program

      For $i = 0 to 20


  4. erik
    May 21, 2009 at 5:27 pm

    AHK is my choice. It is pure genius. Automizing my daily jumping between 4-5 programs in Windows. An extreme shortcut compared to developing something in VBA.

  5. ajbritton
    May 21, 2009 at 4:50 pm

    I cannot speak for AHK, but AutoIt is one of the finest utilities out there. I've used it to create all kinds of small administration utilities which I use in a medium sized network. Simple GUIs are easy to create with a bit of practice and it's even possible to create little apps that live in the system tray. I love it.

  6. ShakiestNerd
    May 21, 2009 at 8:46 am

    I've used both AutoIt and AutoHotkey and they are both good. Their scripts are basically compatible with each other.

    Started out using it for launching apps with a hotkey, e.g. ctrl+alt+f launches firefox.

    It can also be used to be used as a global auto-correct for things you frequently misspell. Same feature can also be used to auto-expand text in chat windows. For example, if you type "btw" it can automatically expand out to "By the way,".

    A similar use is to add signatures to emails or a pithy quote to blog comments.

    Also use it to automatically fill in forms on web pages. Have one that will scrape an excel file and paste the data in a form I have to fill out.

    Scripts can be compiled into .exe as mentioned. A friend of mine has written a couple utilities that he has compiled so that he can distribute them to non-AutoIt users. One really good one has a GUI front end and pulls user lists and groups from active directory.

    Good tool!

  7. Shon
    May 20, 2009 at 4:15 pm

    I have used AHK many times. I have used it for creating login routines for ldap servers as well as for just menial tasks.

    You may want to have a look at They are a very helpful community and will even write scripts for you if you post it in the request section.

  8. Doc
    May 20, 2009 at 3:18 pm

    I've used AutoHotKey to convert my ABit Media XP Pro Remote's into something useful...aside from the 4 "arrow" keys and the Select (Enter) key (which emulate a normal keyboard), they keys produce CTRL+ALT+SHIFT+function key keystrokes, which AHK converts into whatever I want; the sample volume key script adds an on-screen volume control (which also captures my Logitech keyboard's volume/mute keys, plus WIN+cursor up/down). A few more tweaks adds ALT+ENTER (full screen), ALT+TAB, Windows Start button, ALT+F4, "My Computer" buttons, which makes browsing my media library and playing videos MUCH easier from my couch!

    Go to for dozens of other AHK scripts (many compiled into EXE form) that are QUITE useful!

  9. Mel
    May 20, 2009 at 2:23 pm

    As anyone who claims to be a geek (at heart at least) know the AHK (Auto Hot Key) as the defacto standard of windows macro building, editing and running. I had dabbled with creating a .ahk script and running it. Was not very impressed by the results. I was wondering if anyone actually installed and used it for something meaningful, like entering the same text into a form with 37 required fields ?

    • Rarst
      May 20, 2009 at 10:05 pm

      I don't think there is such a thing as defacto standard for macro. Too many solutions that cater to different people.

      Personally I do not macro (as in record and play) much but AutoIt is my language of choice for small utilities.