Rather than Manually Creating Windows Shortcuts for QuickLinks.ahk, Use the AutoHotkey FileCreateShortcut Command
* * *
Recently, while working with the QuickLinks.ahk script, I’ve encountered so many AutoHotkey learning points involving a number of different techniques that I plan to spend the next few blogs discussing the various possibilities. If you regularly use QuickLinks, then you’ll likely want to fashion it to your needs. While most of the tailoring gets done by working directly with the target folders, you’ll find times when changing the code works best. Rather than attempting to deliver a final product for final download, I offer instruction on how to add various features to your version of QuickLinks.ahk and leave the work up to you. The example shown in the image below reflects the changes I’ve made to my personal copy and do not appear in the posted version.
* * *
One of the characteristics I like most about the QuickLinks.ahk script is its simplicity. It operates on a basic backbone which includes two loops (the files and folders Loop command). The first loop works through the folders found in the QuickLinks directory creating the top level menu. The second loop adds the individual links in each folder to each main menu item. Continue reading →
Discover Autohotkey Tricks By Perusing Code In Other Scripts, Plus How to Load Any Windows Program at Startup
Many users find it easy to manually setup a program to auto-launch whenever they log onto Windows, but creating a shortcut and placing the new file into the Windows Startup folder requires a number of steps. With AutoHotkey, the same actions take just one command.
If You and Your Students Have Access to Windows Computers, Then You’re Set! If Not, Well…
The varied computer situations of educators present a particular problem for AutoHotkey use. AutoHotkey works only on Windows computers. Fortunately, 90% of the desktop and laptop computers currently in use run Microsoft Windows. On the downside for teachers, they may or may not have access to Windows machines in the classroom. Plus, even if students have a computer available at home, not all of them are Windows PC. This makes it difficult to create consistent computer-dependent lesson plans covering everyone in the class.
Noting the difficulties with applying a Windows-based program to schooling, I forge on with the possibilities for those instructors in a position to take advantage of AutoHotkey.
The innovative educator can change up the AutoCorrect script to include those annoying words students regularly interject into something more appropriate and/or educational. For example, suppose a teacher notices that students overuse the word “fat” in their papers. Add an alternative Hotstring to a special AutoCorrect script which might include an automatic replacement:
Of course, numerous other options exist (i.e. corpulent, fleshy, beefy, paunchy, plump, full, rotund, tubby, pudgy, chubby, chunky, burly, bulky, elephantine). Other possible AutoHotkey approaches similar to the OverusedWords.ahk script might work better. This Hotstring app pops up a menu of replacements for a list of overused words—as determined by English teachers when grading papers. (See image at right which offers substitutes for the work angry.) While primarily for students, this script works for anyone hoping to improve their writing. Chapter Eleven of Beginning AutoHotkey Hotstrings discusses this script.
Another creative AutoHotkey script might use these same techniques found in the OverusedWords.ahk script to pop-up educational windows (MsgBox command rather than a menu of replacement words) whenever a student types specific words on their windows computer. For example, suppose you want to reinforce the idea that Columbus set sail for the new world in 1492? Include the following code in any AutoHotkey script:
MsgBox, Columbus sailed the ocean blue!
MsgBox, Columbus set sail for the new world in 1492!
After loading the two Hotstrings (1492 and Columbus), whenever typing either string followed by the space key or punctuation, the respective MsgBox windows pop up with the additional information.
The Web as a Reference
AutoHotkey has the capability to make any Web lookup easier. The short beginning AutoHotkey strip SynonymLookup.ahk demonstrates how to use the Windows Clipboard to quickly access reference sites on the Web. In this case, after hitting the Hotkey combination CTRL+ALT+L, Thesaurus.com opens in the default browser using the highlighted word in any text to find synonyms. (Referenced in the blog “Why AutoHotkey for Writers, Bloggers, and Editors?“) The ZIP file includes both the AHK script and the compiled EXE file which runs on any Windows PC—even without AutoHotkey installed.
More Word Choice
Specifically written for the poet inside us all, the Rhymes Pop-up script MenuRhymeMenu.ahk uses both Web lookup and the sample menu from the OverusedWords.ahk script to find rhymes. Simply highlight the target word (house in the example shown at the right), then use the CTRL+ALT+R Hotkey combination. AutoHotkey accesses the http://www.rhymer.com Web site and parses the list of soundalike words for addition to the pop-up menu.
The PoeticWords.ahk script includes Hotstrings which instantly change five cent words into more exotic 50¢ permutations. The PoeticWords.ahk script contains over 500 Hotstrings for replacing common words with more pretentious counterparts.
These two scripts illustrate examples of how AutoHotkey might help both teachers and students in their quest for beautiful words (PoeticWords.ahk) and/or rhymes (RhymeMenu.ahk)—first introduced in “Why AutoHotkey for Poets?”
Early Childhood Education
AutoHotkey offers creative educational opportunities far beyond the manipulation of the English language. Simple multimedia scripts enhance learning for the younger student. As an example, the NumbersSpeak.ahk script includes the cow-skating.jpg (image file) and cow-madcow.wav (audio file) putting together an entertaining expression of sight and sound. Discussed in the blog “AutoHotkey Scan Codes, Speech, Sound, and Splash Images in Children’s Apps.”
Press the letter “C”, and the script displays the SplashImage, reads the words, then spells “cow”, followed by the sound of a laughing mad cow mooing.
While the script is far from complete, it features some of the AutoHotkey tools available for building cute children’s scripts. It is an apt companion for the educational TalkingText.ahk script which voices the letters of the keyboard. then makes animal sounds when certain animal names are spelled (e.g. cat, dog, bear, and more).
A Talking Keyboard
In the blog “Why AutoHotkey for Grandparents?“, I introduce a one-line AutoHotkey script which makes the keyboard voice the previously pressed key by pressing the SPACEBAR:
Load this script and let the little ones press keys, then the SPACEBAR to hear the key names spoken.
More Multimedia Presentations
The PhoneRing.ahk script (included in Chapter Six of the AutoHotkey Applications e-book) combines a graphic file, an audio file, and the computer voice to display a multimedia message. Activated with ALT+P, it demonstrates the use of a splash image with audio as a message, compiling all the files into one executable package which not only runs on any Windows computer but cleans up after itself.
Quiz Timing and Classroom Reminders
If you happen to keep a Windows computer on your classroom desk, other administrative tasks become easier. The EggTimer.ahk app script opens a window (after loading, press CTRL+F12) where you set the desired test time interval, then click Start. The time counts down to zero while a progress bar works its way from left to right. Once the countdown increments to zero, a bell rings, the computer voice says “Your eggs are ready!”, and a window pops up with the same message. Now you have the perfect soft boiled egg (or, with a simple modification, maybe “Put your pencils down!”). Included in the AutoHotkey Applications e-book.
The Reminder.ahk script has gone through many iterations and has more to come—although I’m not sure when. I use it to tell me to take out the trash on Wednesday and for other quick temporary reminders. It is called up with the hotkey combination CRTL+WIN+R plus the most recent version has a Set Reminder option in the System Tray icon right-click menu.
In the classroom, it can remind the teacher when specific events must occur—such as a pop-quiz before the end of the period. The various versions of the Reminder files (some compiled into EXE files) have been included for people who are reading the book Digging Deeper into AutoHotkey. You can find those versions of the script in the Reminder.zip file.
Explanations of the Appointment Reminder script are incorporated in more detail in one section of the e-book Digging Deeper Into AutoHotkey and extended in Chapters Thirty-two and Thirty-three in the e-book AutoHotkey Applications. I encourage anyone to tailor the script for personal use—possibly adding multiple reminder capabilities and a repetitive reminder feature. I plan to do that myself when the time is right. (Maybe I should set up a reminder?)
Teach Programming with AutoHotkey
If you teach people to program, I would argue which language you use has less relevance than the techniques you teach. Learning to program is about learning how to think in a logical way while working with the tools common to most computer languages. For that reason, if I were instructing a class of budding system analysts, I would use AutoHotkey.
AutoHotkey includes all the tools (loops, if conditionals, etc.) that a programmer needs to use in any of the many programming languages. In fact, once you learn one language, you can quickly pick up another. It’s merely a matter of learning the syntax and technical differences. AutoHotkey includes virtually everything that you find in other languages, plus some simple extra tools (Hotkeys and Hotstrings) offering immediate results for students. In addition, the easy construction of GUIs (Graphical User Interfaces) makes building powerful pop-up apps easy.
An AutoHotkey student gets instant useful results. The importance of immediate outcomes can’t be overemphasized. Without them, demotivation soon follows. Most programming lessons start with the infamous “Hello, World!” routine. After that, the lessons become esoteric and metaphysical. Many may give up the journey while condemning programming as a boring occupation. However, when a student gets quick, practical results, the motivation level stays high.
Many more possibilities for AutoHotkey exist in education. Those mentioned here only represents my own minor endeavors. I have no doubt that creative teachers and professors will find numerous other ways to enrich the minds of their students with AutoHotkey on Windows computers.
Remember All Your Grand Kid’s Birthdays and Their Ages! There’s No Limit to the Number of Ways You Can Amuse Your Grandchildren with AutoHotkey, Plus It Gives Your Brain a Much Needed Workout!
If you only have one grandchild, then you probably won’t have much trouble recalling his or her birthday or age. In that case, you may not have much interest in the little AutoHotkey GrandKids.ahk script. However, AutoHotkey offers much more which can enrich your offspring’s offspring’s education and entertainment—including a one-line script which verbalizes out loud the letters and numbers on the computer keyboard. But more importantly, learning to write AutoHotkey scripts exercises your mind—something everyone needs.
* * *
Some of the scripts in this blog may not make AutoHotkey look easy, but you’ll find the first steps to AutoHotkey literacy quite simple. For a comfortable startup, check out this Introduction to AutoHotkey.
While Writing AutoHotkey Scripts Should Be No Problem for Most Engineers and Scientist, Many Might Be Surprised by How Much the Free Language Offers in Windows Tools
I’m not sure how many people with technical backgrounds are familiar with AutoHotkey. My guess is that quite a few have never heard of the free open source language. Without a personal referral or ubiquitous marketing, free software such as AutoHotkey often goes overlooked for a long period of time. It’s not until individuals realize how much AutoHotkey can do for them that they start to explore the possibilities.
No software package does everything you want. That’s why adding little extras makes any program better. The beauty of AutoHotkey is that in addition to automating individual Windows programs, it can cross boundaries and add more features to any Windows software. Plus, it has the capability to create special pop-up apps for specific usages. The Windows utility building features in AutoHotkey can be especially helpful for anyone working in a technical field. Continue reading →
While Using AutoHotkey with Windows Makes Sense for Most Professions, It’s Not So Obvious for Artists and Graphic Designers
If you work in the graphic arts on computers, then you know that a multitude of programs exists for creating designs and original art pieces. Each one works a little differently with specific strengths and weaknesses. You may even use a couple of particular software packages for certain projects. Wouldn’t it be nice to own a few tools which work in every one of those programs?
When producing ads and capturing screenshots, even I use a number of disparate apps for designing and finishing the artwork. (I have a preference for the free Paint.Net program.) However, no matter how powerful and feature-filled the software, I always want the tools to do a little more while working in each program. That’s where AutoHotkey comes in. Continue reading →
November 1, 2016: Just as I was marching off in another direction, one more check of the AutoHotkey.com site surprised me. The hidden indexing feature discussed in this blog started working again. Go figure! Will it last? Who knows? But for now, this blog is valid again. I’ll now be able to introduce the AutoHotkey Quick Reference tool I had started working on.
October 26, 2016: I don’t know if it’s temporary or permanent, nor do I know why, but much of the AutoHotkey Web site index capability (if not all) discussed in this blog has been disabled. I don’t know the rationale for the change or if it may return, but it was a great aid to anyone doing AutoHotkey scripting while it lasted. (One week for me from my point of discovery to its disappearance.) Stranger things have happened. Needless to say, I’m back to browser searches for AutoHotkey URLs.
Learn a Hidden AutoHotkey Trick for Quickly Accessing AutoHotkey Online Command Information
Occasionally (completely by accident), I come across surprising, eye-opening tips. In my last blog, I used an AutoHotkey script to access an online thesaurus by merely highlighting a word and hitting the assigned Hotkey. I began checking other Web sites for how easily I could run a similar site search. Naturally, since I include links to the Web reference commands in virtually every blog I write, I checked out AutoHotkey.com. In the process, I uncovered a remarkable secret. Continue reading →