Automated snow SMS alert

I hate leaving for work in the morning and seeing this

As someone that has been dabbling in AutoHotKey for years I have scripts lying around that run on schedules that I don’t remember writing. Some of them I’ve totally forgotten about until they contact me. My “Snow SMS Alert” is one of those sleeper scripts. I wrote this years ago to wake me up early before work if I needed to go clean snow off my car.

Basically it works like this:

Windows Task Scheduler runs the script 30 minutes before I usually wake up for work.
The script pulls down the API feed from Weather Underground and searches for “snow” in a particular location.
If it looks like it’s snowing sendEmail.exe is used to send an SMS to my phone.

You can easily send SMS messages over email using this formatting:

Alltel [10-digit phone number]
AT&T [10-digit phone number]
Boost Mobile [10-digit phone number]
Nextel [10-digit telephone number]
Sprint [10-digit phone number]
T-Mobile [10-digit phone number]
US Cellular [10-digit phone number] (SMS)
Verizon [10-digit phone number]
Virgin Mobile USA [10-digit phone number]


Makes sure SendMail.exe is in the same directory as the AHK script for this to work. With any luck you’ll be greeted with a handy SMS warning before you get out to your car.


Snow SMS Alert

When scheduled through Windows "Scheduled Tasks" this script will send an SMS to
your phone to get you up early enough to clean off your car.

TheNewHobbyist 2010 


; Set variables here
location = ORD ; Your closet airport code or zipcode
phonenumber = ; phone number in email format
smtpserver = ; outgoing SMTP server
returnemail = ; return address for message

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

URLDownloadToFile,, temp
Sleep, 2000
FileRead, Contents, temp
StringSplit, bib, A_LoopField, <   If RegExMatch(bib2,"weather>",SubPat)
    StringTrimLeft, bib2, bib2, 8
    if bib2 contains snow, Snow
          Run sendEmail.exe -s %smtpserver% -t %phonenumber% -f %returnemail% -u "It's snowing..." -m Go clean your car off.