My 100th publication here at Experts Exchange is an article that presents a program called ArticlesVideosEE, which is able to download the Title, number of Views, number of Endorsements, number of Points, number of Comments, and Date Published for each article and video whose link is in a list. You may read the article here:
As you can see from the Title of the article and video, I enhanced the program after publishing the initial version to include columns for the number of Comments and the Date Published. There have also been three other enhancements:
• Ability to specify all the run-time parameters in a configuration file (config.ini) so that (i) the source code does not have to be modified to specify new options/settings and (ii) the Browse dialogs shown in the first video may be avoided.
• Support for a Command Line Interface (CLI) such that a different configuration file (not just config.ini) may be specified on the command line, thereby allowing great flexibility to run ArticlesVideosEE in a command/DOS prompt, a batch file (.bat), the Task Scheduler, programs/scripts, etc. — anywhere that a command line call can be made.
• Addition of a debugging parameter (DebugRun) that will be helpful if the website's page layout ever changes.
This second video Micro Tutorial picks up where the first one left off, providing a demonstration of the program's enhancements since the initial version.
Video Steps
1. Download and install AutoHotkey
If you do not already have AutoHotkey installed, read this EE article:
In the config.ini file created in Step 4, change the folder/file locations as needed for your system (if you do not have Excel, put another program in the OpenResultsWith setting, such as c:\Windows\System32\notepad.exe).
Note that ArticlesVideosList.txt is the same file that you created while reading the article or during the steps in the first video.
Place the config.ini file in the same folder as the program file (ArticlesVideosEE.ahk).
6. Run the program and confirm the enhancements
As you did during the first video, run the program.
Confirm that you did not get the Browse For Folder and Browse For File dialogs (because the enhanced ArticlesVideosEE will find those parameters in the config.ini file).
Confirm that the Results file automatically opened in Excel (or whatever program you put on the OpenResultsWith line).
Confirm that the Results file contains the new Comments and Date Published columns.
7. Create another configuration file and use it to test the Command Line Interface (CLI)
Create another configuration file, as in Steps 4 and 5, but call it something other than config.ini, such as MyArticles.ini.
Using a command/DOS prompt or batch file, run the program with the full path of the new configuration file as the parameter.
For example, run this in a command/DOS prompt (if the configuration file has spaces in its name, enclose it in quotes):
You're welcome, Andrew, and thanks back at you for your enhancement suggestions...definitely made the program better! Thanks, too, for the Endorsement and Approved accolade...both very much appreciated! Regards, Joe
When adding new VBA features to a workbook, some parts may be difficult but you struggle through it because it's important to you or to someone you're helping. During that struggle you may say to yourself that "I wish I could find an easier way". Ho…