AutoHotkey.com

jaco0646

AutoHotkey.net

Download my AutoHotkey scripts here. AHK is the most useful tool a PC can have!
Check out AutoHotkey.com for a description of the program.

Never programmed anything in your life? Read my advice on learning AHK.

These scripts have only been tested by me on Windows XP Professional SP2.
This means they will likely run on any version of XP as well as Windows 2000.
Some* of these scripts will NOT function properly on Windows 9x or Windows Vista.


Games

Infection ~ Forum Topic
Infection (commonly known as Ataxx) is a 2-player strategy game in which you attemt to maneuver your colored pieces near your opponent's and thereby infect his pieces: convert them into your own. Whichever player has the most pieces at the end wins. Games of Infection are subject to dramatic reversals of fortune, so having a commanding lead early on in no way guarantees victory. There is no such thing as momentum in Infection; every move is a battle. The script includes a Help menu with links to more information about the game, as well as another Ataxx program with a much more difficult AI. Enjoy! P.S. I have a Pic of a few of my favorite Block arrangements here.

Tic-Tac-Toe ~ Forum Topic
Updated: 2/2/08
The classic scratch-paper game! Play against another person, or against the computer using one of 4 levels of difficulty. Level 4 is designed to be unbeatable...

MasterMind ~ Forum Topic
Updated: 2/10/08
A simple code-breaking board game... can you crack the code in 8 tries or less?

Peg Solitaire ~ Forum Topic
Another simple single-player board game. Jump the red pegs over eachother until there's only one left.


File & Folder Management

Text Compare ~ Forum Topic
Updated: 3/9/08
This script compares two text files side by side so that each line of the first file is compared to each line of the second file and vice versa. It has three options: Ignore white space, Report mismatches, and Output in HTML. It can therefore be configured to report in different formats, with significantly more or less information. All of the options, as well as a more thorough explanation of the program are outlined in the new Help File.

Directory Compare ~ Forum Topic
Updated: 1/6/08
Another comparison script, this one looks at the contents of two folders and checks if they're the same based on file names and sizes. Useful to ensure backups are up-to-date.


Internet Explorer Related

IE Cache Delete* ~ Forum Topic
Updated: 1/5/08
If you know what an index.dat file is, it's probably because you wanted to delete one at some point. Unfortunately, index.dat files tend to be in use by the operating system, making them tough to get rid of. That's what this program does. It also empties some of the folders that commonly fill up with temp files from Internet Explorer. If you don't know what an index.dat file is, the program contains a couple helpful links to websites with more information. To access the data stored inside index.dat files, check out this forum topic.

Typed URLs Editor
Updated: 11/5/07
This one allows you to edit the Internet Explorer history of typed URLs (the drop-down list). It can delete, rename, and reorganize any of the URLs you've typed in. Useful for fixing spelling errors and removing old links.

FavIcons Editor
I have about 150 links saved in Internet Explorer's favorites, and I like to assign each one its own icon. Unfortunately, not all websites provide a FavIcon, and I prefer to replace some of those that are provided. Manually performing this process is time consuming, so I wrote a script. To use this script, you need a folder containing icons that have the exact same names as your IE favorites. The script simply matches each favorite to its corresponding icon in that folder and enters the icon's path into the favorite itself.
Two more icon programs I use are FavIconizer and Icon Shop. I recommend both.

IP Toggle ~ Forum Topic
When I'm at home I use a static IP address on my laptop, but when I'm on the road I often need to switch to DHCP (Obtain an IP address automatically). I run this script to toggle back and forth between the two settings. It saves time versus manually entering the data. So far the script is tailored specifically to my needs, but it could easily be adapted to other environments.


Operating System Related

Edit-Control Selection Delimiter ~ Forum Topic
ECSD lets you choose how much and what kind of text gets selected (highlighted) when you double-click and triple-click in an Edit control (e.g. Notepad). The forum topic gives a thorough example to show what ECSD can do.

Add-Remove Programs Editor* ~ Forum Topic
Updated: 10/3/07
Ever wondered how the Add-Remove Programs control panel applet gets its information? It seems like the sizes, frequency of use, and even the icons are often wrong. This article explains how the info is calculated; and this Add-Remove Programs Editor will let you alter the fields, including Name, Icon, Size, and Frequency of Use.

Dual Display Toggle* ~ Forum Topic
Updated: 10/25/07
This little tool replicates the functions available on the Settings tab in the Display Properties Control Panel. It can extend the Windows desktop onto a second monitor, plus alter screen resolution, color quality, and refresh rate. A similar script with oodles more features can also be found here.

MRU* ~ Forum Topic
Updated: 12/29/07
In response to a help request, I wrote this short script to display Windows' most recently used documents in a list view. It isn't particularly robust as-is, but is rather a framework for a script to display more comprehensive info about recent documents and potentially perform actions on them.


Miscellaneous

ETA (for loops) ~ Forum Topic
This scriptlet was an answer to another help request. Add it to a loop you've created, and it will employ Linear Regression to display a progress bar along with the amount of time remaining until the loop finishes (its Estimated Time of Arrival). Gives you something to look at while a long sequence of commands is running.

WinOnTop ~ Forum Topic
An AHK recreation of the popular WinOnTop program. It can set any window on the top or bottom of others and will reside in the system tray to be used when convenient. If you're looking for more features like resizing, hiding, rolling up into title bar, hotkeys, and control over multiple windows, check out this forum topic.

Clipboard History ~ Forum Topic
Updated: 3/8/08
As the name implies, this script keeps track of all the text you put on the clipboard, in case you need it again after it's been replaced. It can save all the old contents to a text file or put items back on the clipboard to use again. The script also includes some code that formats URLs placed on the clipboard for use in the AutoHotkey forum. See the forum topic for more information.

AlphaWiki ~ Forum Topic
I wrote this code to alphabetize the Script Listing on the AutoHotkey Wiki (see links at the bottom of this page). The script is very specialized, obviously; but any other Wiki-ers are welcome to use it, and it could be modified to handle other pages as well.

Pixel Ruler ~ Forum Topic
Here's a quick hotkey that measures the distance between two points on the screen in pixels. It can help with the layout of GUIs.

StopWatch
A simple little timing device that became a surprisingly long experiment. The name pretty much describes it. Note: it does NOT keep accurate time; CPU load affects its performance. I haven't been motivated enough to fix it, however. ;) Besides, there is a better script already written.


Tidbits
Last but not least, here are a few tidbits of code I've found useful at one time or another.

First, to determine your public IP address, the following 4 lines will do the trick:
Forum Topic
UrlDownloadToFile,http://www.netikus.net/show_ip.html/,%TEMP%\ip
FileReadLine,IP,%TEMP%\ip,1
FileDelete,%TEMP%\ip
MsgBox,4160,Public IP,%ip%

Second, if tooltips are being displayed beneath the System Tray making them unreadable, 1 line of code can put them back on top!
Forum Topic
WinSet,AlwaysOnTop,,ahk_class Shell_TrayWnd

Third, to find the cluster sizes of fixed disk partitions use this snippet of code:
DriveGet, drives, List, Fixed
Loop, Parse, drives
{
 RunWait, %comspec% /c fsutil fsinfo ntfsinfo %A_LoopField%: > tmpFile,,Hide
 FileRead, ntfsInfo, tmpFile
 FileDelete, tmpFile
 Loop, Parse, ntfsInfo, `n, `r
 {
  StringLeft, line, A_LoopField, 17
  If line = Bytes Per Cluster
  StringMid, size, A_LoopField, 35
 }
 var .= A_LoopField ":" A_Tab size A_Tab "Bytes per Cluster`n"
}
MsgBox, 4160, Cluster Size, %var%

NOTE:
The above method of capturing data from a Windows command line utility can be used to retrieve a plethora of useful information such as:
  • WorkGroup Name
  • Internet Connectivity
  • Network Drives
  • MAC Addresses
  • and much more.

  • For a list of the available command line utilities see the A-Z Index. You may also want to refresh your memory or learn more about The Command Line in Windows.


    Extraneous Scripts
    I also recommend these scripts, written by prominent AHK users.

    Scriptlet Library by Toralf.
    Store and organize all those small functions and snippets of code that you reuse over and over in different scripts.

    AHK Window Info by Toralf.
    A replacement for the AutoIt3 Window Spy currently bundled with AutoHotkey.

    Enumerate Processes by Shimanov.
    Similar to the Windows Task Manager, provides a list of running processes as well as their command lines.

    Isense by Majkinetor.
    AHK scripting monitor and syntax helper, an improvement on Rajat's "IntelliSense" currently bundled with AutoHotkey.


    = Can't get enough AHK? Check out the Script Listing over at the AutoHotkey Wiki. =

    Created 10-08-2006
    Modified 6-27-2008
    PM Me