Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
TheLastManStanding
Jan 14, 2008
Mash Buttons!

BeastOfExmoor posted:

Humble Request
Are you replacing the file with one of the same name? Or do you want to set the name of the file you're looking to replace?

Request Fill
Edit: Threw something together in Autohotkey. For the source you'll need Autohotkey 1.1.* to run it and SciTE4AutoHotkey to edit. The program gives you a gui to select the new file and an edit box in case the old file has a different name. There is a checkbox for testing, allowing you to run it without actually replacing anything. A txt log is spit out at the end which lists all the files which were replaced. The script assumes that it's in the root directory to be searched.

Compiled
Source (ahk file)
Source (txt file)

TheLastManStanding fucked around with this message at 02:06 on Dec 9, 2017

Adbot
ADBOT LOVES YOU

TheLastManStanding
Jan 14, 2008
Mash Buttons!

Shlomo Palestein posted:

Humble Request:
So the idea is this: a program that looks to a text file for five pieces of data: Day of Week, Start Time, End Time, Lookback and Name, for as many entries as are present. The Day of the week should be converted to the actual date format (MM-DD), and the program should look back Lookback number of days, downloading the file and formatting it after the fact by adding the Name where "wzbc" normally exists. The Start/End times would tell the program how many files to rename using the Name.

So this might play out with a text file that looks like this, with a pipe delimiter:

M|8|10|IR

Request Fill
Name: WZBC Downloader
Download: Google Drive Link - Zip file includes the compiled app, the source (written in ahk), and 2 text files.

Use:
- list.txt contains a list of filters in the form "Title, Day|Day ,Hour|Hour". Example: "Chicken Soup, Mon|Wed, 08|15|20".
- The above example would produce 6 files (Mon @ 8am, 3pm, and 8pm; Wed @ 8am, 3pm, and 8pm).
- It does not fill between times, thus 08|10 would not download 09. Use 08|09|10 instead.
- Days are in 3 letter form and are case sensitive. Hours are in 24h and use a leading zero.
- The filter list allows spaces.
- When running the program, a progress bar is displayed.
- The mp3s are saved to \%script_folder%\mp3\%title%\%title%%datestamp%.mp3
- Items that have been downloaded are logged in history.txt and won't be downloaded again. Note: this only logs the original file name; if a file matches two filters with different titles, it won't be downloaded to both folders unless they are downloaded at the same time.

Let me know if it works :ohdear:

TheLastManStanding fucked around with this message at 08:33 on May 2, 2019

TheLastManStanding
Jan 14, 2008
Mash Buttons!
Yeah, guis in AutoHotkey are a bit janky, and it's not unusual to have parts of them load funny. Even if the progress bar doesn't load the main program will still run and operate correctly.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply