19. October 2017 · Comments Off on Automate Downloading Web Images to any Folder · Categories: AutoHotKey, Graphics, Scripts · Tags: AutoHotKey, Command-line Tools, Windows
Last updated on 05/12/2020

Automate saving web images to a specified folder by copying image URLs to the clipboard using an AutoHotKey (AHK) script. Usually, the process to save a web image from a browser consists of: (1) right-click the image, (2) select “save picture as”, and (3) navigate to the folder to save the image. While usually acceptable for single images, this process can can be slow and tedious for multiple images.

folder and images

AutoHotKey and Wget need to be installed for the script to work. The version of Wget used for this guide was wget-1.19.1_curl-7.52.1_win32_win64.7z, a portable package with Curl that includes the 32-bit and 64-bit versions of Wget, a ca certificate, localization, and a manual. The latest Wget windows binaries may also be downloaded from eternallybored.org.

The script was tested on a 32-bit version of Windows XP, using portable versions of AutoHotKey and Wget. The only modification needed for a portable installation of Wget is to set the path for the wget or wget64 executables in the script. The script will work without modification if Wget and AutoHotKey are already installed and the paths for AHK and Wget were set by the installer. Paths can be checked with the “set” command from a windows prompt, or by using Control Panel -> System -> Advanced Tab -> Environment Variables -> System Variables -> Path.

AHK Script Download

(Click to view, or right-click and use “save Link Target as” to download):

  wget photos cects.txt (3.1 KiB, 2,392 hits)

Setup and Use:

Setup
Before using, enter the path to the wget or wget64 executable in the script if wget is not in the system path. Optionally, enter a full path to an icon file for the script. Also, the extension of the script must be changed from txt to ahk.

How to Use

  1. Start the script with a double-click
  2. Enter or paste an existing folder path to save downloaded images and click OK. If no path is entered the default path will be the same folder as the script.
  3. Right click an image in your web browser and select “Copy image URL”
    1. A cmd window opens and displays downloading progress. It closes after the download is completed
    2. The image URL and date are appended to photolog.csv in the specified folder
    3. All characters after jpg. jpeg, gif, or png are removed from the URL before downloading
    4. URLs that don’t include the jpg, jpeg, gif, or png extensions are ignored
  4. To change folders, reload the script and enter a new existing folder path

Context menu tools such as FilemenuTools may be used to start the script and set the download folder automatically from any location.

Print Friendly, PDF & Email
Share
19. September 2015 · Comments Off on Create YouTube Playlist Links – No Login Required · Categories: AutoHotKey, Command-line Tools, Video, Windows · Tags: AutoHotKey, scripts
Last updated on 04/11/2020

YouTube playlists are a useful way to watch videos in sequence or for sharing a list of videos with others. However, at times it may be insecure to share playlists created from your personal account or inconvenient to log in into your account to create them. This guide describes how to create playlists in a single link that allows you to view your videos immediately, save them for later, or to share them with others – without logging into your YouTube account.

youtube filmstripA YouTube playlist can be created manually by concatenating the unique videoIDs, separated by commas, to the URL:

https://www.youtube.com/watch_videos?video_ids=

A completed playlist will thus look like so:

https://www.youtube.com/watch_videos?video_ids=video_id#1,video_id#2,etc

Just paste the completed link into your browser to start the playlist. A more complete explanation of this process can be found at this blog post: How to Create YouTube Playlists without Logging In.

Creating playlists manually can be inconvenient, so a way to accomplish this automatically with a script was sought. Because the Windows command-line doesn’t easily support the clipboard without 3rd part tools, AutoHotKey was used instead since it can manipulate the clipboard more easily. AutoHotKey version 1.1.32.00 was used for the script and tested on a system running WinXP.

AutoHotKey script: youtube_playlist2.ahk

To use the script, run it to monitor the clipboard for youtube.com/watch, youtube.com/embed/, or youtu.be; text which is used in normal, embedded, or shortened YouTube video links. The script generally ignores any other text, so in most cases, the script can be active and not interfere with normal clipboard activity.

After starting the script, a popup message appears in the system tray to alert the user that the script has started and informs the user that CNTL +Y will create the playlist link and copy it to the clipboard, CNTL + Z exits the script, and that CNTL + ALT + C clears the playlist and clipboard.


Each time a YouTube video link is copied to the clipboard, a Tray tip displays the link that was processed and how many video links in total were copied and processed. Hit OK to continue. Wait 2.5 seconds between selecting videos (when the Tray tip disappears) before selecting another video.

After selecting all your videos, use CNTL + Y to copy the final playlist to the clipboard. Another popup message (screenshot below) will appear. This popup indicates the total number of videos in the playlist, the final playlist link, how to exit the script, and reminds the user that the playlist link has been copied to the clipboard. The playlist link is ready to use by pasting it into a browser or in an email. After hitting OK you can continue adding videos or use CNTL + Z to exit, or CNTL + ALT + C to clear the playlist and clipboard. Other ways to clear everything and start over are to reload the script by right-clicking the script icon in the system tray and selecting “Reload This Script”, or just exit the script and restart.

youtube playlist

 

The script can be further customized by the user as desired.

Print Friendly, PDF & Email
Share
Private
guidelines
">Bear

Bad Behavior has blocked 1348 access attempts in the last 7 days.