Stuffing More into AutoHotkey Pop-up Menus (AutoHotkey Tip)

Rather Than Increasing the Length of a System Tray Menu, Add Submenus—Plus, How to Use Menu Names (A_ThisMenu) for Conditional Actions

cheeseburgerrecipeWhen I decided to add two more recipes to the cheeseburgerwhiteicon Jack Stuffed Cheeseburger script, I ran into the problem of adding too many items (one for each step in each recipe) to the System Tray right-click menu. In the original, Cheeseburger.ahk script, I only included four steps in the menu (Ingredients, Prepare, Cook, and Serve). However, after inserting the Animal-Style Cheeseburger and the Jack Stuffed Cheeseburger (Animal Style) into the script, the number of recipe increments jumped from four to 18—plus an additional Print Recipe option for each burger. Also, since many of the steps use the same (or similar names), I needed a method for identifying each step with the proper recipe. When increasing the number of AutoHotkey menu options, cumbersome lists of items commonly crop up. You can fix these bloated menus by using submenus. Continue reading

Advertisements

Create a Universal MsgBox Print Function with ControlGetText (AutoHotkey Tip)

When Nothing Else Works for Copying Text, Try the ControlGetText Command and Create a Global MsgBox Print Function

In a previous blog, I highlighted the Control, EditPaste command. The command helped me solve a particular problem where the standard Send, ^v (Windows paste shortcut) responded too slowly. I’ve since discovered that the complementary ControlGetText command resolves some sticky MsgBox printing troubles. It not only works quicker than the Windows copy shortcut (Send, ^c) but it greatly reduces code. Continue reading

Understanding Label Names and Subroutines (Beginning AutoHotkey Tip)

Once You Know How AutoHotkey Label Names Work, You Can Add More Tricks to Your Bag of AutoHotkey Skills

cheeseburger-ingredientsWhile in the past I often used the terms AutoHotkey Label and subroutine interchangeably, that’s not exactly accurate—although the two terms maintain a close relationship. Misunderstanding how Label names work can be a source of errors for new AutoHotkey script writers. However, knowing the differences between what constitutes a Label and a subroutine opens up new scripting opportunities. The CheeseBurgerRecipe.ahk script uses little-known Label behavior to either walk through all the steps or jump to individual sections of the recipe for a “Jack Stuffed Cheeseburger.” Continue reading

Why AutoHotkey for Chefs and Dieticians?

cheeseburgerwhiteicon While You Don’t Often See Television Chefs Using Computers, AutoHotkey Offers Guidance When Cooking “Jack Stuffed Cheeseburgers” at Home

*          *          *

While I came up with a pretty cool barebones recipe script for this AutoHotkey blog, I’m not sure how well computers and cooking mix. From what I’ve seen, professional chefs don’t have much time to mess with technology—except for possibly writing cookbooks—in which case, I would refer them to “Why AutoHotkey for Writers, Bloggers, and Editors?.”

*          *          *

cheeseburgercartoon

Using a computer while cooking presents a challenging task. Although looking up a recipe on a smartphone works great, poking at the device with fingers covered in cookie dough proves impractical. Ideally, any kitchen machine is lightweight and stands upright on its own.

Although a little pricey, the Microsoft Surface Pro (or another less expensive Windows ultralight laptop computer) might do the job. Large enough to read the screen, yet easy to move around a cooking area, these computers help any budding chef or dietician who needs to check recipes—as long as no one dumps boiling water on the keyboard. For size and convenience, finding equipment more practical than a lightweight laptop proves difficult. Continue reading

Tips for Optimizing the Standard AutoHotkey Message Box (MsgBox) Command (AutoHotkey Quick Reference Part Six)

AutoHotkey MsgBox Tricks for Adding Power and Flexibility to Your Scripts. If You Want a Simple, Quick Way to Display Data and Execute Action, You’ll Love These Techniques!

As I go back to work on the AutoHotkey Quick Reference script (based upon the hidden index in the AutoHotkey Web site), I ponder what enhancements I should add next. I find fourbuttonmsgboxthat I now regularly activate the lookup Hotkey combination which displays AutoHotkey command, function, or variable formats—often just to check syntax. The usefulness of this reference script motivates me to do more with it.

After adding a special section to the script which parses the math function Web page (not yet discussed) and planning a future implementation of some pop-up menus—possibly using the Input command (discussed in the Beginning AutoHotkey Hotstrings book)—I finally settled upon including a feature which inserts the text format for commands, functions, and variables from the message box directly into any editing field. Continue reading