Using the Right Images Make Your AutoHotkey Menus Both Prettier and More Useful
It’s easy enough to put together a plain vanilla AutoHotkey pop-up menu without any icons. The sample QuickLinks script creates a menu from favorites Windows shortcuts in the QuickLinks folder. However, a stripped down menu looks pretty boring and makes individual items harder to find. 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.
Auto-Fill Windows Program Data Fields Using RegEx—Plus, Alternative for Pop-up Messages
While the Coloretta Viva script copies pixel colors, transferring codes to Windows Paint gets awkward. This AutoHotkey data filling technique for multiple fields works in any Windows program. Plus, we look at another method for popping up user messages.
Clarification of Earlier AutoHotkey BlockInput Command Tips
While working on a couple of chapters in my new book, I noticed that I had effectively blocked inadvertent mouse movement while running a demonstration of a Windows Paint automation routine. In the script DrawSquiggle.ahk, AutoHotkey turns off the mouse while it executes various other mouse movements. Otherwise, any accidental manual movement of the mouse cursor might screw up the final result. Most importantly, the command to block mouse action worked without raising user privilege levels or running the script as an administrator.
While studying the behavior of Label names in AutoHotkey scripts, I came up with the CheeseBurgerRecipe.ahk script which automatically moves to the next Hotkey recipe step with no additional code by dropping pass the next Label name directly into its subroutine. I didn’t expect to find another use for this technique so soon, but when I encountered the problem of losing track of invisible windows, this technique offered a quick fix. Continue reading →
Handy Window Transparency Wheel Using Macro Replacement Quickly Peeks Under a Window without Moving It, Plus the Difference Between % Var and %Var% Made Easy
The AutoHotkey online documentation goes into great detail about the traditional method for retrieving values from variables (%Var%) and the force expression evaluation method (% Var). It can take the new AutoHotkey user a little while to comprehend the differences between the two. In an effort to clarify the variations and help beginners to understand when to use which method, I offer an alternative way to view the operations. For the traditional method, I prefer using the terms macro substitution or variable name replacement. Once, you understand how it works, differentiating when and how to use each technique becomes easy.
The value-added trick comes when creating variables containing new variables on-the-fly by combining the two methods (i.e. forcing an expression % which contain a %Var% variable name replacement). The first step involves replacing the variable with its value, the new variable name (%Var%). The second step requires the forced evaluation of the new variable (% VarValue) as part of an expression.
* * *
A while back I installed a volume control operated by the mouse scroll wheel. Simply hover over the Windows Task Bar and scroll the mouse wheel up or down to adjust the PC speaker volume level higher or lower, respectively. A progress bar (shown at right) pops up displaying the changing volume level. I’ve added this convenient tool to my standard AutoHotkey script and use it all the time.
At a later date, while playing with window visibility, I set up a menu for changing the transparency level for the active window (shown at left). At the end of that blog, I suggested, “If you want to get really fancy, then you might use the mouse wheel to set the transparency (or opaqueness) level.” I’ve done just that with my new SeeThruWinWheel.ahk script. Now, by holding down the CTRL key while scrolling the mouse wheel, the window under the mouse cursor becomes less opaque (WheelDown) or more opaque (WheelUp). In the course of writing this short script, I implemented a number of AutoHotkey tricks worth discussing. Continue reading →