RSS
 

Archive for the ‘autohotkey’ Category

How I do it: Dropbox

14 Jan

DB_Header1

If you don’t have Dropbox installed stop what you’re doing and install it.

Go ahead.

I’ll wait.

For those not “in the know”, Dropbox is free a cloud based backup/psedo-versioning system. And it’s awesome, oh, and it’s free. Note: I really like Dropbox but Google Drive, SpiderOak, box.com, Microsoft SkyDrive, and BitTorrent Sync are all good alternatives. The important thing here is to backup your files! I also use Dropbox to keep my 3D modeling software in sync, here’s how I do it.

Read the rest of this entry »

 

Automated snow SMS alert

11 Jan

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]@message.alltel.com
AT&T [10-digit phone number]@txt.att.net
Boost Mobile [10-digit phone number]@myboostmobile.com
Nextel [10-digit telephone number]@messaging.nextel.com
Sprint [10-digit phone number]@messaging.sprintpcs.com
T-Mobile [10-digit phone number]@tmomail.net
US Cellular [10-digit phone number]email.uscc.net (SMS)
Verizon [10-digit phone number]@vtext.com
Virgin Mobile USA [10-digit phone number]@vmobl.com

Source: makeuseof.com

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 = 8881112222@txt.att.net ; phone number in email format
smtpserver = mail.isp.com ; outgoing SMTP server
returnemail = snowscript@isp.com ; 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.

IfExist,%A_ScriptDir%temp
FileDelete,%A_ScriptDir%temp
URLDownloadToFile, http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query=%location%, temp
Sleep, 2000
FileRead, Contents, temp
Loop,Parse,Contents,`n
{
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.
        }
    break
  }
}
FileDelete,%A_ScriptDir%temp
 
 
 


css.php