Fully Automatic Screenshots

Yesterday, I mentioned my script that would automatically take a screenshot and make a thumbnail. Today, I modified the script to do even more for me. Now this script:

  • Takes a screenshot
  • Makes a copy of that screenshot and resizes it down to 500 pixels wide
  • Saves both of these screenshots to my Inbox folder
  • Uploads both of these files via FTP to my web server
  • Replaces the contents of the clipboard with the HTML to link to the large screenshot and display the thumbnail.

So, when I want to upload a screenshot to my blog, I hit Windows Key + Shift + Print Screen, wait a moment, and then hit Paste into my blog entry, and it’s done.

Find out how you can set this up in the extended entry.

As before, I originally found the inspiration for the screenshot script on the official AutoHotkey forums and changed it for my needs.

Disclaimer: I made this for myself. It may not work for you, and I bear no responsibility for any damage you do to your data by using this script.

Step 0: Install AutoHotkey.

Step 1: Download the Download the GDIPlusHelper.ahk script script to your AutoHotkey program folder (typically C:\Program Files\AutoHotkey\).

Step 2: Save batch file to the same folder as your AutoHotkey script. (This was the My Documents folder for me.)

Step 3: Open the batch file from Step 2 in a text editor like Notepad or e.

Step 4: On line 1 change ftp.YOURSERVER.com to your server’s name.

Step 5: On line 3 change USERNAME PASSWORD to your FTP username and password.

Step 6: Currently the script assumes that you want to put your files in ~\public_html\images. If this needs to be changed, alter the “cd” commands in lines 4 and 5 to go to the folder of your choice.

Step 7: Save and close the batch file.

Step 8: Right-click on the AutoHotkey script icon in the system tray, click Edit This Script, and paste the contents of this Autohotkey Script File to the top of your current AutoHotkey Script file.

Step 9: Change SetWorkingDir C:\Users\Jeremy\Desktop\Inbox on line 7 to the directory of your choice on your hard drive.

Step 10: Change clipboard = <a href="http://www.YOURSERVER.com/images/%largefilename%"><img alt="Screen shot taken %prettyTime%" src="http://www.YOURSERVER.com/images/%smallfilename%"></a> on line 91 to your server’s details.

Step 11: Save the AutoHotkey script and reload it from the AutoHotkey icon in the system tray.

And you’re done! If everything goes according to plan, you’ll have a fully-automagic screenshot uploader script up and running.

Comments are closed.