How to Send E-mail Directly from an AutoHotkey Script

Using Windows CDO COM, You Can Send E-mail Without Opening Your E-mail Program

RobotEmailCartoonIn my last blog, I wrote a short script for extracting data from a Web page without using a Web browser (“Quick and Dirty Web Data Extraction Script“). As a demonstration, I showed how to quickly download and cull a daily horoscope from an astrology site for display in a MsgBox window. It occurred to me that rather than using a Hotkey each time I wanted to view my horoscope, I would prefer to receive it each morning in an e-mail. That way I could set up the script to run automatically and push the data to me at the same time every day. Plus, I can view an e-mail on any device (e.g. smartphone, tablet, or non-Windows computer) without any special programming. This requires sending an e-mail via an AutoHotkey script. Continue reading

Timing Script Speed (AutoHotkey Quick Tip)

Certain Types of Subroutines Tend to Eat Up Time (Loops, On Screen Changes, Multiple Drive Accesses, etc.)—Use This Simple Timer Routine to Figure Out How to Increase AutoHotkey Script Speed

Anytime you use AutoHotkey to make iterative changes in the controls in a GUI (Graphical User Interface) pop-up window, force multiple access to hard drive files, or implement repetitious subroutines (almost always with some form of a loop), you run the risk of slowing down your scripts. Minor changes to your script can make a significant difference in how fast it runs. Continue reading

Add Action to Your Hotstrings Using the New X Option (AutoHotkey Tip)

The Hotstring X Option Offers More Power by Running Commands, Functions, and Subroutines, Plus How to Temporarily Block External Hotstrings

In February of last year, the powers-that-be added a new Hotstring() function and a number of other Hotstring related features (See “New Flexible Hotstring Features Added to AutoHotkey.”) This major change added a host of new possibilities for creating and manipulating Hotstrings. The Hotstring() function acted as the impetus for my InstantHotstring.ahk script. In the process of writing that app, I developed a better understanding of how to enhance Hotstrings. Getting immediate feedback when implementing new replacements and options allowed me to quickly investigate many possibilities. Continue reading

The Coming Instant Hotstring Script (AutoHotkey App)

The InstantHotstrings.ahk Script Allows the Creation and Testing of Hotstrings

Library Benefits

January 5, 2019 Update: You can find the InstantHotstrings.ahk script at the ComputorEdge AutoHotkey Free Scripts page.

I started writing the InstantHotstrings.ahk script as a demonstration of the new Hotstring() function. I planned to keep it basic. (See the previous blogs, “Create Instant Hotstrings Using the AutoHotkey Hotstring() Function” and “Using the AutoHotkey Hotstring() Function to Disable/Enable Hotstrings.”) However, as often happens, the script ballooned into much more. While it continues to demonstrate various aspects of the Hotstring() function, it now includes a number of other features worth discussing (e.g GUI DropDownList, adding Hotstring options, saving and loading files).

I plan to post the current version of the app soon, but I don’t feel it’s quite ready. So, in this blog, I review the script’s features which provide topics for my future blogs. Although not my intention, you could call this a teaser of what’s yet-to-come. I should have the script ready for posting next week. I’ll publish a notice here when I’ve added it to the ComputorEdge Free AutoHotkey Scripts page. (I didn’t want you to think that during this holiday period I wasn’t working on something.)

January 5, 2019 Update: You can find the InstantHotstrings.ahk script at the ComputorEdge AutoHotkey Free Scripts page.

In addition to the two blogs mentioned above, I will write a series of pieces about the meat and potatoes in this new app:

  1. Add Hotstring options to the activated Hotstrings and the GUI DropDownBox control.
  2. Discuss the behavior of the various Hotstring options within the Hotstring() function.
  3. Look at considerations when using the X (execute) option in the InstantHotstring.ahk script.
  4. Save temporary Hotstrings to a .ahk file.
  5. Use the FileSelectFile command to save/load Hotstrings.

Continue reading

Adjust Windows Registry Settings with the AutoHotkey RegRead and RegWrite Commands

Sometimes a Simple Script Offers the Best Way to Learn More Advance Techniques in AutoHotkey

I’ve just posted a script written years ago by Robert Ryan (the person responsible for the very capable RegEx Tester) which displays hidden files by changing settings in your Windows Registry—a trick you can apply to many other Windows settings if you know where to find them.

UnHideFilesThe problem with setting folders or files to Hidden in their Properties window (right-click on selected folder or filename in Windows File Explorer and click Properties at the bottom of the menu) involves losing sight of them forever. Since the listing disappears from view, you can forget that it even exists. Windows offers a multi-step procedure for making all Hidden folders/files visible, but who can remember that? This simple UnHideFiles.ahk script saves the stress. Continue reading

Calculating Timespans in Years, Months, Days in AutoHotkey, Part 2 (Understanding the HowLong() Function)

Taking a Close Look at the HowLong() Function for Calculating Years, Months, and Days

In this blog, I discuss in its entirety the most recent AutoHotkey code for the HowLongYearsMonthsDays.ahk script (introduced in my last blog). I’ve broken it up into snippets in order to explain the purpose of each piece. To get a complete copy of the script check out HowLongYearsMonthsDays.ahk at the “ComputorEdge Free AutoHotkey Scripts” page or for a barebones version (without comments and inactive code) see “Function Calculating Timespan in Years, Months, and Days” at the AutoHotkey Forum. This blog reviews the nuts and bolts of calculating the timespan between two dates.

Continue reading

Calculating Timespans Between Dates in Years, Months, Days (AutoHotkey Function)

Calculating the Years, Months, and Days Between Two Points in Time Takes More Than Simple Mathematics

Years ago, I wrote an AutoHotkey timespan calculation function for keeping track of my grandkids ages. (I wrote about it in my Digging Deeper Into AutoHotkey e-book and you can find the original function in the GrandKids.ahk scripts.) Developing the function was a bit of a mindbender. As I remember, I just plowed through the project finding my way by trial-and-error. When I recently reviewed the script, I had a heck of a time figuring out what I had done. I know that I explained the steps in the book, but the script (even with the few comments) remained a mystery to me.

As I thought about it, I soon realized that I might write a better function if I changed how I viewed the problem. Continue reading