The AutoHotkey Input Command Makes It Easy to Use the LegalInput.ini Data Table in Multiple Ways
A few weeks back I demonstrated how to build an INI data table for driving AutoHotkey scripts. I used the INI file format (LegalInput.ini) because it includes one index for quickly looking up records. In the file, I created four-character codes for accessing records which include the English legal definition, the Latin term, and a description (if any).
While essential to the AutoHotkey feature discussed last time, you’ll find the INI file structure incidental to the technique discussed in this blog. You can use an INI file either for its index or as a standard data table with no special capabilities. As demonstrated in this piece, you’ll find a number of different ways to take advantage of a data table—without requiring an INI file. An INI file gives you a convenient means for quickly accessing data, but (especially for short files) you’ll discover numerous other methods for extracting the information you want. Continue reading →
Use Simple Database Files to Both Write AutoHotkey Code and Create Flexible Scripts
In the last blog, I introduced a simple AutoHotkey app I call PictureSounds.ahk. When the user clicks on an image, AutoHotkey seeks the name of the sound file in an INI lookup table, then plays it. The script uses the image file name as the INI file Key. After loading a series of images, the script plays a different sound for each image. (It even plays videos!)
Using the INI file as a lookup table saved me from writing a different subroutine (or at least If condition) for each Picture control in the GUI window. Now, I show how to use that same data file to write the command code lines for adding the images to the pop-up files. Continue reading →
For One Day, Monday, May 1, 2017, the Just Published E-Book Is Available for the Kindle and Kindle Apps on Amazon.com
I’ve made the new e-book Why AutoHotkey? available exclusively on Amazon and you can get the book free. It’s not that you need the book since most of its contents can be found right here on the Why AutoHotkey? page. I’ve produced this book for people who don’t know about or use AutoHotkey. As you are already accessing this blog, you’re likely well aware of AutoHotkey. My goal with this new book is to reach the AutoHotkey unaware. I’m guessing the Amazon is loaded with those types of Windows users.
I plan to make the book free more times, but Amazon only allows me to give it aways five times in a three-month period. (I would always make it free if they would let me.) Don’t worry if you miss this one. I’ll announce in this blog whenever I schedule another free book day. (Sign-up to follow the blog at the upper right of this page if you want notification whenever a new blog comes out.)
I know…I’ve expressed my disdain for the way Amazon treats independent writers, but they have such a huge reach, it would be silly for me to completely ignore them. (I still prefer people buy from ComputorEdge E-Books, but everyone must have an option.) This new compilation book should help the uninitiated to understand how much power AutoHotkey can bring to their Windows PC.
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.
Ten Reasons Why Every Student Should Use the Free AutoHotkey Windows Tools! AutoHotkey Helps You So Much Academically That You’ll Think You’re Cheating! Plus, It’s Delicious Brain Food and Helps Get You a Job!
Using AutoHotkey should be mandatory for every student from high school on through college! Not merely because learning AutoHotkey invigorates the brain cells (which it does!), but it makes all your Windows tasks so much easier that it seems unsporting. AutoHotkey takes the grunt work out academia making learning fun…almost.
(If you know a student who uses a Windows computer, then do him or her a favor by sending him or her a link to this article. If he or she doesn’t already know about AutoHotkey, he or she will thank you profusely.)
Erstwhile Multifarious Poets Optated for Quill and Parchment. Forthwith, AutoHotkey Propounds the Furtherance of Lyrical Ruminations on Windows Computers.
Okay…I’m not a poet. My mind doesn’t work that way. But that doesn’t mean I can’t see how AutoHotkey might be useful to people who craft the English (or any other) language. Even so, I occasionally enjoy writing a short rhyming couplet. (I know…constructing rhyming poems has become cliché—at least for real poets.)
In this blog, I offer a couple of AutoHotkey scripts for assisting and inspiring(?) budding wordsmiths. The first includes a set of over 500 Hotstrings for inserting “the most beautiful words in the English language.” The second script draws upon the Web to create a pop-up menu of rhymes. Even if you never intend to write a poem, you might find these AutoHotkey techniques interesting and/or useful. Continue reading →