HDW File Mgr Command Line Switches

Automating HDW File Downloads - JCapper Help Doc

Using command line switches in JCapper to fully
automate your HDW file download experience


Last Updated: June 21, 2017
 
Automating HDW File Downloads JCapper Help Doc

TABLE OF CONTENTS:  

  • The Switches MENU

  • IE/WinInet Clear Cache

  • The Mid Day Results File




  • <-- Back to Table of Contents


    GENERAL OVERVIEW

    Automating HDW File Downloads with Command Line Switches:

    The HDW File Mgr in all versions of JCapper published 01-02-2017 and later delivers the ability to use Command Line Switches to fully automate your HDW File Download Experience.

    Using Command Line Switches to automate your HDW File Downloads involves:
    1. Understanding what a Command Line Switch is.

    2. Understanding the Command Line Switch Keywords that The HDW File Mgr is programmed to recognize and respond to.

      From there, it's a simple matter of:

      • Clicking MENU in The HDW File Mgr - followed by selecting one of the Command Line Switch menu items.

        When you do that - the interface executes the embedded commands on the Switch.

        For example, when you click the /GetCharts CurrentMonth SynchToDisc AutoBuild NoExit Switch on the Menu - the interface will: Auto-login to the HDW site, auto-perform a Synch to Disc, auto-download all new Chart Files for the specified date range (in this case the current month) to DataFolder1, and then auto-run a File Build Routine on the downloaded files.

        Keep in mind that all of this happens automatically -- from a single mouse click!

        Or maybe you'd rather:

      • Create one or more DOS batch files (file extension .BAT) where each file runs a Command Line with a Switch that launches The HDW File Mgr - which then executes the Commands on the Switch in sequence.

        You could then create a Desktop Shortcut that launches a .BAT file - that in turn launches The HDW File Mgr - that in turn executes all of the commands embedded on the Switch.

        With this strategy you could easily embed commands on the Switch that would cause the HDW File Mgr to: Queue up Chart Files, Synch to Disc for the current month, Download Chart Files to DataFolder1, run a File Build Routine on DataFolder1, and then close the HDW File Mgr.

        You could create a second Desktop Shortcut to do the same thing - but for Data Files instead of Charts.

        And then any time you want to get new files: Just run the appropriate shortcut.

      • Maybe you want to take things a step further - and write scripts using a third party automation product to run your Shortcuts at preset times:

        You could schedule one script to run the Chart Files Shortut first thing in the morning.

        And maybe have a second script scheduled to run your Data Files Shortcut a few minutes later.

        So instead of spending 10 minutes every morning after breakfast getting files -- you'd automatically have files whenever you decide to start your race day.


    Command Line Switches Explained:

    Command Line Switches are what makes automation possible.

    For example, the full path and filename to The HDW File Mgr's .exe file is:
    	c:\JCappper\Exe\HDWReader.exe

    If you were to click the Windows start button to bring up the Windows start menu - and hit RUN - and type "CMD" (without the quotes) into the box and click OK: Windows will launch an old school window that gives you a DOS command prompt.

    If you were to key "cd c:\JCappper\Exe\" (without the quotes) after the prompt and hit the Enter key: The folder in the command window would change to
    	c:\JCappper\Exe\

    If you were to key "HDWReader" or "HDWReader.exe" (without the quotes) you would launch JCapper's HDW File Mgr Module. From there you would have to click buttons and select dates from a calendar control en route to downloading files. (Exactly the same as if you had hit the HDW button on the JCapper Main Module.)

    BUT...

    What if you were to key the following characters onto the command line and hit the enter key?
    	HDWReader/GetCharts Yesterday

    Or what if you had a .BAT file or a script send the same characters directly to the command line?

    If you did that you would cause the following to happen:
    1. The HDW File Mgr would launch.

    2. And The HDW File Mgr would recognize "/GetCharts Yesterday" (without the quotes) as a valid Command Line Switch.

    3. From there, The HDW File Mgr would execute the following events:

      • Auto-Log In to the HDW site (provided you have the 'remember me' box checked.)

      • Auto-Queue up Chart Files.

      • Auto-select Yesterday's Chart Files.

      • Auto-download Yesterday's Chart Files to the folder you have persisted as DataFolder1 in the DFM (Data Folder Manager.)

      (The interface would do all of this without you having to do or click anything.)

    That's a really simple example of a Command Line Switch.

    Executing Command Line Switches (seamlessly) in The HDW File Mgr isn't rocket science - but it DOES require that you understand what a Command Line Switch is.

    Beyond that - you also need a basic understanding of the Keywords that The HDW File Mgr is programmed to recognize and respond to.

    From there - I think you'll quickly discover that just about anything you can do manually in the HDW File Mgr can be automated.

    It's just a matter of knowing how to string the right keywords together.


    About the Table of Contents:

    The Table of Contents in this help doc is made up of clickable links. Click a topic you are interested in - and you will be taken to the section for that topic.

    To return to the Table of Contents - simply click one of the Back to Table of Contents links found throughout this help doc.


    After reading this help doc you should be able to:
    • Understand what a Command Line Switch is.

    • Know enough about the Keywords supported by The HDW File Mgr - that you are comfortable clicking MENU - and running automated file downloads using any of the built in Switches.

      So much so that you regularly find yourself using the Switches on the MENU to run single click automated downloads - instead of running your downloads manually.

    • Create DOS batch files that you can use to start The HDW File Mgr and run automated file downloads that are controlled by Command Line Switches.

    • Create a Desktop Shortcut that runs a batch file - and have the batch file being run by the Shortcut start The HDW File Mgr and run automated file downloads that are controlled by Command Line Switches.

    • Reach the point where you are ready to tackle using a third party automation product to write your own scripts to start The HDW File Mgr and run automated file downloads that are controlled by Command Line Switches.


    -jp

    .



    <-- Back to Table of Contents


    Anatomy of a Command Line Switch


    The HDW File Mgr in JCapper is programmed to recognize and respond to Command Line Switches that are made up of the following individual parts:

    • {/Leading Slash Character} A Leading Slash Character "/" (without the quotes) is required and is always the first character found in JCapper Command Line Switches.

    • {FileType} A FileType Keyword is required and follows to the immediate right of the leading slash character. The FileType Keyword is used to describe the type of file, either Chart Files or Data Files, to be downloaded.

    • {DateRange} A DateRange Keyword is required and typically follows next. The DateRange Keyword is used to describe a date range for the files to be downloaded.

    • {SynchToDisc} A SynchToDisc Keyword is optional and if used typically follows next. The SynchToDisc Keyword is used to instruct the interface, True or False, whether or not to perform a Synch to Disc prior to downloading files. If a SynchToDisc Keyword is omitted the interface will perform a Synch to Disc (as the default) prior to downloading files.

    • {AutoPath} An AutoPath Keyword is optional and if used typically follows next. When used the AutoPath Keyword is followed by a single space followed by the folder or path where files will be downloaded to. When the AutoPath Keyword is omitted the interface uses the folder persisted as DataFolder1 in the DFM as the default location where files will be downloaded to and where File Build Routines will be run.

    • {AutoBuild} An AutoBuild Keyword is optional and if used typically follows next. The AutoBuild Keyword is used to instruct the interface, True or False, whether or not to perform a File Build Routine after downloading files. If an AutoBuild Keyword is omitted the interface does not run a File Build Routine (as the default) after downloading files.

    • {AutoExit} An AutoExit Keyword is optional and if used is typically the last Keyword found on the Switch. The AutoExit Keyword is used to instruct the interface, True or False, whether or not to close The HDW File Mgr after all other commands on the Switch have been executed. If an AutoExit Keyword is omitted the interface defaults to not closing The HDW File Mgr after all other commands on the Switch have been executed.

    Keywords are typically placed horizontally on the Command Line from left to right, separated by single spaces, like this:
    	{/Leading Slash Character}{FileType} {DateRange} {SynchToDisc} {AutoPath} {AutoBuild} {AutoExit}

    Note that in my description of a valid Command Line Switch (above) I have enclosed each of the individual Keyword Types in curly brackets.

    Also note that when actual Keywords are assembled to form a valid Command Line Switch - curly brackets are not used at all.

    Here's an example of a valid Command Line Switch using actual Keywords:
    	/GetCharts CurrentMonth SynchToDisc AutoBuild AutoExit

    In the above Command Line Switch:
    • "/" (without the quotes) is the leading slash character. (It tells the interface that there is in fact a Command Line Switch and to expect Keywords to the right.)

    • "GetCharts" (without the quotes) is the {FileType} Keyword. (It tells the interface to get Chart Files.)

    • "CurrentMonth" (without the quotes) is the {DateRange} Keyword. (It tells the interface to get files for the current month only.)

    • "SynchToDisc" (without the quotes) is the {SynchToDisc} Keyword. (It tells the interface to perform a Synch To Disc before downloading files.)

    • "AutoBuild" (without the quotes) is the {AutoBuild} Keyword. (It tells the interface to perform a File Build Routine after downloading files.)

    • "AutoExit" (without the quotes) is the {AutoExit} Keyword. (It tells the interface to close the HDW File Mgr after all other commands on the Switch have been executed.)

    • Note that the {AutoPath} Keyword is omitted. (Omitting the {AutoPath} Keyword tells the interface to use DataFolder1 as the default location for File Downloads and File Build Routines.


    -jp

    .



    <-- Back to Table of Contents



    {FileType} KeyWords:

    The {FileType} Keyword is used to describe the type of file, either Chart Files or Data Files, to be downloaded.

    Below is a list of the valid {FileType} KeyWords (with the leading slash character included) that can be be used on a Command Line Switch to get Data Files:
    • /GetDataFiles
    • /DataFiles
    • /GetRaceFiles
    • /RaceFiles
    • /D


    Below is a list of the valid {FileType} KeyWords (with the leading slash character included) that can be be used on a Command Line Switch to get Chart Files:
    • /GetChartFiles
    • /ChartFiles
    • /GetCharts
    • /Charts
    • /C


    The rules for {FileType} KeyWords are pretty simple:
    1. Valid Command Line Switches always begin with a leading slash character immediately followed by a single {FileType} Keyword.

    2. Do not use multiple {FileType} Keywords on the same Switch.

    3. If you want a Command Line Switch to get Data Files: Use one of the Data File Keywords. (It does not matter which one. The choice of which Data File Keyword to use is left up to you.)

    4. If you want a Command Line Switch to get Chart Files: Use one of the Chart File Keywords. (It does not matter which one. The choice of which Chart File Keyword to use is left up to you.)


    Here's an example where the "/GetCharts" Keyword (without the quotes) is used in a Command Line Switch:
    	/GetCharts CurrentMonth SynchToDisc AutoBuild AutoExit
    Here's an example where the "/Charts" Keyword (without the quotes) is used in a Command Line Switch:
    	/Charts CurrentMonth SynchToDisc AutoBuild AutoExit
    Note that both Command Line Switches are valid and that both Switches do the same thing.


    Here's an example where the "/GetDataFiles" Keyword (without the quotes) is used in a Command Line Switch:
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    Here's an example where the "/DataFiles" Keyword (without the quotes) is used in a Command Line Switch:
    	/DataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    Note that both Command Line Switches are valid and that both Switches do the same thing.


    -jp

    .



    <-- Back to Table of Contents


    {DateRange} KeyWords:

    The {DateRange} Keyword is used to describe a date range for the files to be downloaded by the Command Line Switch.

    Below is a list of the valid {DateRange} KeyWords that can be be used on a Command Line Switch - along with a brief explanation for each:
    • CurrentMonth -- Use the "CurrentMonth" Keyword (without the quotes) to get files for the current month only.

    • PriorMonth -- Use the "PriorMonth" Keyword (without the quotes) to get files for the prior month only.

    • Today -- Use the "Today" Keyword (without the quotes) to get files for today only.

    • Yesterday -- Use the "Yesterday" Keyword (without the quotes) to get files for Yesterday only.

    • AutoDate -- Use the "AutoDate" Keyword (without the quotes) to get files for single requested calendar date only.

      The correct way to use the "AutoDate" Keyword (without the quotes) is to use the keyword itself - followed by a space - followed by 8 characters of date text for the requested calendar date - like this:
      AutoDate 12282016
      In the above example, the date text "12282016" (without the quotes) translates out to 12-28-2016 -- and tells the interface to get files for December 28, 2016.


    The rules for {DateRange} KeyWords are pretty simple:
    1. The {DateRange} Keyword is required. Your Command Line Switch cannot run properly if you forget to use a {DateRange} Keyword.

    2. Do not use multiple {DateRange} Keywords on the same Switch.


    Below are some examples of {DateRange} Keywords being used on a valid Command Line Switch to get Data Files:
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    	/GetDataFiles PriorMonth SynchToDisc AutoBuild AutoExit
    	/GetDataFiles Today SynchToDisc AutoBuild AutoExit
    	/GetDataFiles Yesterday SynchToDisc AutoBuild AutoExit
    	/GetDataFiles AutoDate 12282016 SynchToDisc AutoBuild AutoExit

    Note that each of the above Command Line Switches are identical except for the {DateRange} Keyword.

    Meaning that each of the above Switches performs the same tasks -- but for a different date range.


    -jp

    .



    <-- Back to Table of Contents


    {SynchToDisc} KeyWords:

    The {SynchToDisc} Keyword is used to instruct the interface, True or False, whether or not to perform a Synch to Disc prior to downloading files.

    Below is a list of the valid {SynchToDisc} KeyWords that can be be used on a Command Line Switch - along with a brief explanation for each:
    • SynchToDisc -- Use the "SynchToDisc" Keyword (without the quotes) to instruct the interface to perform a Synch to Disc prior to downloading files for

    • NoSynch -- Use the "NoSynch" Keyword (without the quotes) to instruct the interface to NOT perform a Synch to Disc prior to downloading files.


    The rules for {SynchToDisc} KeyWords are pretty simple:
    1. The SynchToDisc and NoSynch KeyWords are meant to be used with CurrentMonth and PriorMonth date ranges only. Do not use SynchToDisc or NoSynch on a command line where you are using Today, Yesterday, or an AutoDate as the date range.

    2. The {SynchToDisc} Keyword is optional. Your Command Line Switch can run just fine without one.

    3. If you do not use a {SynchToDisc} Keyword - when the Command Line Switch is run - the interface performs a Synch to Disc (by default) before downloading files.

    4. Do not use multiple {SynchToDisc} Keywords on the same Switch.

    Below are some examples of how {SynchToDisc} Keywords can be used on Command Line Switches to get Data Files:
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    	/GetDataFiles CurrentMonth AutoBuild AutoExit
    Note that in the first example (above) "SynchToDisc" (without the quotes) was included on the Switch. But in the second one it was not.

    Both of the above Switches do the same thing: They both perform a Synch to Disc before downloading files. See rule #2 (above.)

    Let's look at one more:
    	/GetDataFiles CurrentMonth NoSynch AutoBuild AutoExit
    Note that the above Switch contains "NoSynch" (without the quotes) as the {SynchToDisc} Keyword.

    When the interface runs this Switch it does NOT perform a Synch to Disc prior to downloading files.


    --Now let's look at some examples of what NOT to do:
    	/GetDataFiles Today SynchToDisc AutoBuild AutoExit
    	/GetChartFiles Yesterday NoSynch AutoBuild AutoExit
    	/GetChartFiles AutoDate 12282016 SynchToDisc AutoBuild AutoExit

    Note that the first rule about {SynchToDisc} Keywords (above) states:

    The SynchToDisc and NoSynch KeyWords are meant to be used with CurrentMonth and PriorMonth date ranges only. Do not use SynchToDisc or NoSynch on a command line where you are using Today, Yesterday, or an AutoDate as the date range.

    All of the command lines shown in red (above) break that rule.

    I put the rule in this help doc because (as I type this) the HDW File Mgr has not been programmed to handle the case where SynchToDisc or NoSynch are used on a command line that uses Today, Yesterday, or an AutoDate as the date range.

    If you break the rule and use SynchToDisc or NoSynch on a command line where you are using Today, Yesterday, or an AutoDate as the date range:

    You are going to get erratic behavior out of the HDW File Mgr when that command line is executed.



    -jp

    .



    <-- Back to Table of Contents


    {AutoPath} Keywords:

    The {AutoPath} Keyword is used to provide the interface with the path or folder location where files will be downloaded and where File Build Routines will be run.

    Below is a list showing the lone valid {AutoPath} KeyWord that can be be used on a Command Line Switch - along with a brief explanation of how to use it correctly:
    • AutoPath -- Use the "AutoPath" Keyword (without the quotes) to provide the interface with the path or folder location where you want downloaded files to go and where any File Build Routines will be run.

      The correct way to use the "AutoPath" Keyword (without the quotes) is to use the keyword itself - followed by a space - followed by text for the full path - like this:
      AutoPath c:\2016\October\
      In the above example, the text of the full path is "c:\2016\October\" (without the quotes) -- and tells the interface to download files to the c:\2016\October\ folder -- and run a File Build Routine there as well -- but only if the "AutoBuild" Keyword (without the quotes) was also included on the Command Line Switch.

      Note that if the "AutoBuild" Keyword (without the quotes) is not included on the Command Line Switch files will still be downloaded to the c:\2016\October\ folder but a File Build Routine will not be run.


    The rules for the {AutoPath} KeyWord are pretty simple:
    1. The {AutoPath} Keyword is optional. Your Command Line Switch will run just fine without one.

    2. If you do NOT include an {AutoPath} Keyword on a Command Line Switch: The interface uses the folder persisted as DataFolder1 in the DFM as the default location where files will be downloaded and where File Build Routines will be run.

    3. If you DO include an {AutoPath} Keyword with valid path text on a Command Line Switch: You are telling the interface to override the system default and replace DataFolder1 with the path text that you included on the Command Line Switch.

      Important! Test a new Switch by running it to ensure that path text used after an {AutoPath} Keyword is valid. If the Switch runs and you are getting files on the desired path: your path text is valid. But if the Switch doesn't run and/or and you not are getting files on the desired path: Chances are good that that your path text is not valid.

    4. Do not use multiple {AutoPath} Keywords on the same Switch.


    Below are some examples of how an {AutoPath} Keyword can have an impact on a Command Line Switch that gets Data Files:
    	/GetDataFiles CurrentMonth SynchToDisc AutoPath c:\2016\October\ AutoBuild AutoExit
    	/GetDataFiles CurrentMonth SynchToDisc AutoPath c:\2016\November\ AutoBuild AutoExit
    Note that in the first Command Line Switch (above) the path text is c:\2016\October\ -- (meaning that files will be downloaded to that location and that any File Build Routines will take place there.)

    Note that in the second Command Line Switch (above) the path text is c:\2016\November\ -- (meaning that files will be downloaded to that location and that any File Build Routines will take place there.)

    Important! -- It should be apparent that if you are using folder structure designed to store files for specific calendar time periods -- you need to be careful about the actual path text that you use after the {AutoPath} Keyword on your Command Line Switches.

    You may find it easier to avoid the {AutoPath} Keyword altogether -- and simply let the interface default to DataFolder1 -- and use the DFM to actively manage the path stored as DataFolder1 at critical times -- such as at month end, the end of a calendar quarter, or a year end. (Depending on the folder structure you are using.)


    Let's look at one more:
    	/GetDataFiles PriorMonth SynchToDisc AutoBuild AutoExit

    Note that the above Command Line Switch does not contain an {AutoPath} Keyword.

    This means that when the (above) Switch is run: The interface is going to use the path that is stored as DataFolder1 in the DFM (or Data Folder Manager.)


    -jp

    .



    <-- Back to Table of Contents


    {AutoBuild} KeyWords:

    The {AutoBuild} Keyword is used to instruct the interface, True or False, whether or not to perform a File Build Routine after downloading files.

    Below is a list of the valid {AutoBuild} KeyWords that can be be used on a Command Line Switch - along with a brief explanation for each:
    • AutoBuild -- Use the "AutoBuild" Keyword (without the quotes) to instruct the interface to perform a File Build Routine after downloading files.

    • NoBuild -- Use the "NoBuild" Keyword (without the quotes) to instruct the interface to NOT perform a File Build Routine after downloading files.

    The rules for {AutoBuild} KeyWords are pretty simple:
    1. The {AutoBuild} Keyword is optional. Your Command Line Switch can run just fine without one.

    2. If you do not use an {AutoBuild} Keyword - when the Command Line Switch is run - the interface defaults to NOT performing a File Build Routine after downloading files.

    3. Do not use multiple {AutoBuild} Keywords on the same Switch.

    Below are some examples of how {AutoBuild} Keywords can be used on Command Line Switches to get Data Files:
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    Note that the (above) Command Line Switch includes the "AutoBuild" Keyword (without the quotes.) When this Switch is run the interface will perform a File Build Routine after downloading files.
    	/GetDataFiles CurrentMonth SynchToDisc NoBuild AutoExit
    Note that the (above) Command Line Switch includes the "NoBuild" Keyword (without the quotes.) When this Switch is run the interface will NOT perform a File Build Routine after downloading files.
    	/GetDataFiles CurrentMonth SynchToDisc AutoExit
    Note that the (above) Command Line Switch does have an {AutoBuild} Keyword at all. When this Switch is run the interface defaults to "NoBuild" (without the quotes) and will NOT perform a File Build Routine after downloading files.


    -jp

    .



    <-- Back to Table of Contents


    {AutoExit} KeyWords:

    The {AutoExit} Keyword is used to instruct the interface, True or False, whether or not to close the HDW File Mgr after all other commands on the Switch have been executed.

    Below is a list of the valid {AutoExit} KeyWords that can be be used on a Command Line Switch - along with a brief explanation for each:
    • AutoExit -- Use the "AutoExit" Keyword (without the quotes) to instruct the interface to close the HDW File Mgr after all other commands on the Switch have been executed.

    • NoExit -- Use the "NoExit" Keyword (without the quotes) to instruct the interface to leave the HDW File Mgr open after all other commands on the Switch have been executed.

    The rules for {AutoExit} KeyWords are pretty simple:
    1. The {AutoExit} Keyword is optional. Your Command Line Switch can run just fine without one.

    2. If you do not use an {AutoExit} Keyword - when the Command Line Switch is run - the interface defaults to leaving the HDW File Mgr open after all other commands on the Switch have been executed.

    3. Do not use multiple {AutoExit} Keywords on the same Switch.

    Below are some examples of how {AutoExit} Keywords can be used on a Command Line Switch that gets Data Files:
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild AutoExit
    Note that the (above) Command Line Switch includes the "AutoExit" Keyword (without the quotes.) After all other commands on this Switch have been executed the interface closes the HDW File Mgr.
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild NoExit
    Note that the (above) Command Line Switch includes the "NoExit" Keyword (without the quotes.) After all other commands on this Switch have been executed the interface leaves the HDW File Mgr open.
    	/GetDataFiles CurrentMonth SynchToDisc AutoBuild
    Note that the (above) Command Line Switch does have an {AutoExit} Keyword at all. When this Switch is run the interface defaults to "NoExit" (without the quotes) and leaves the HDW File Mgr open.


    -jp

    .



    <-- Back to Table of Contents


    Important! -- Before clicking and running any of the Switches on the Menu -- you need to know what you are doing. The last thing you want to do is blindly run a Switch and end up writing 100's of files to a folder where you don't want them to be. Make sure you have read -- and understand -- all of the material that has been presented (above) to this point before clicking and running any of the Switches on the Menu.


    The Switches MENU:

    The HDW File Mgr now has a MENU that delivers the six most common Command Line Switches that I (personally) find myself using.

    Screenshot showing the HDW File Mgr Switches MENU:

    HDW File Mgr Switches Menu





    To run any of the Switches on the MENU:
    1. Launch the HDW File Mgr.

    2. Click MENU.

    3. Select Switches. Then select the Switch you want to run - and click YES at the prompt.
    That's It!

    The interface will execute the selected Switch.



    Notes and Comments:

    What to do if you accidentally run the wrong Switch:

    If you accidentally run the wrong Switch try not to panic.

    You can always break out of a File Download Routine by clicking the Halt Download in Progress button located in the lower right hand area of the HDW File Download Tool.

    And you can always break out of a File Build Routine by clicking the Halt File Build Routine button located in the lower left hand area of the HDW File Mgr itself.

    And afterwards you should be able to go into the folder where the files were written to - and either delete them - or move them.




    -jp

    .



    <-- Back to Table of Contents


    IE/WinInet Clear Cache:

    The HDW File Mgr now has a MENU option that enables you to clear the cache for Internet Explorer and the WinInet API.

    FYI, the HDW File Mgr uses the WinInet API and dlls that ship with Internet Explorer to navigate the HDW site and get files.

    And while the WinInet API is really good when it comes to downloading files robotically -- there is ONE thing that has always driven me nuts:

    The WinInet API caches downloaded files -- and when you try to use it to download an updated version of a file you've already downloaded -- the WinInet API doesn't give you the updated file -- it gives you the cached version of the file instead.

    Maddening.

    I finally bit the bullet and wrote some code that calls the same librabries used in Internet Explorer to clear the browser cache.


    To to clear the Internet Explorer/WinInet API cache:
    1. Launch the HDW File Mgr.

    2. Click MENU.

    3. Select IE/WinInet - Clear Cache and click YES at the prompt.
    That's It!

    The interface will execute the same librabries that Internet Explorer uses to clear the browser cache.

    Afterwards - the HDW File Mgr should be able to make the WinInet API get you an updated version of a previously downloaded file.



    Notes and Comments:

    The IE/WinInet Clear Cache Menu item and the Mid Day Results File:

    The Mid Day Results File contains chart results data - and is updated at regular intervals throughout each race-day.

    This File is one of the primary reasons I decided to add the IE/WinInet Clear Cache Menu item to the HDW File Mgr.

    During my initial testing of the Mid Day Results File I noticed that the WinInet API kept caching the file the first time I downloaded it - and then insisted on giving me the cached version of the file during subsequent downloads - instead of the latest version of the file.

    Maddening.

    What good is a results file that's updated constantly as races are made official if you can't get the latest version of the file?

    So I figured out how to clear the IE/WinInet cache and added it as a MENU item in the HDW File Mgr.

    So if you are going to use the Mid Day Results File...

    Use these BASIC OPERATING INSTRUCTIONS for Downloading the Mid Day Results File:
    1. Run the IE/WinInet Clear Cache MENU item first.

    2. Launch the HDW File Download Tool.

    3. Click the Mid Day Results File button to queue up the file.

    4. Click the Download button to download the file.

    5. And finally, navigate to DataFolder1 and unzip the file.

    That's It!


    Running the IE/WinInet Clear Cache Menu item does have some implications:

    Running the IE/WinInet Clear Cache Menu item clears the following cache items from Internet Exporer:
    • Browsing History
    • Temporary Internet Files

    This means that if Internet Explorer is your primary/goto web broswer: Running the IE/WinInet Clear Cache Menu item has the ability to impact your overall web browsing experience.

    After running the IE/WinInet Clear Cache Menu item, the next time you launch Internet Explorer:
    • Because the browsing history has been cleared: The next time you start typing a url into the address bar - Internet Explorer will not be able to auto-fill-in the remainder of the url after you key the first few characters. You will need to key the entire url and hit the enter key - just like you did the very first time you visited that url. But after that - the url will have been re-added to the browsing history - and will remain there - until you clear the browsing history again.

    • Because temporary internet files have been cleared: Web pages that previously loaded faster will be slower to load the very first time you visit them after clearing the cache. But the next time you visit that same page - it will be faster to load again because the page will have been once again cached as a temporary internet file. And the page will remain cached as a temporary internet file - until you clear temporary internet files again.





    -jp

    .



    <-- Back to Table of Contents


    The Mid Day Results File:

    The HDW File Mgr now has a Queue Mid Day Results File button.

    The Mid Day Results File is a new file that HDW agreed to produce at my request.

    It's a comma delimited text file that contains chart results data. It's in exactly the same format as a standard HDW *f.txt Chart Results File -- with the following two key differences:
    1. The Mid Day Results File contains data for all tracks running each race day.

    2. The Mid Day Results File is updated throughout each race day at regular intervals.

    The idea behind The Mid Day Results File is to:
    1. Get mid day results into a JCapper table.

    2. Be able to get mid day results in the Data Window.

    As I type this (on 12-30-2016) I'm quietly working on an import routine that (when finished) will accomplish both of the above stated objectives.

    And once that import routine is complete - it WILL be published as part of a Build 198 JCapper program update.

    But since HDW has already created the file and has made it available:

    The HDW File Mgr now has a Queue Mid Day Results File button that enables you to queue up and download the new Mid Day Results File.

    Important! -- I strongly suggest you read the IE/WinInet Clear Cache section of this help doc (above) before you attempt to use the HDW File Mgr to download the new Mid Day Results File.

    You need to know how to Clear the IE/WinInet Cache first. Otherwise the WinInet API will keep giving you the cached version of the Mid Day Results File instead of the latest version of the file.

    Also, if Internet Explorer is your primary web browser - you need to be aware of how clearing the IE/WinInet cache can impact your overall web browsing experience.

    -- Finally:
    1. Pricing for Mid Day Results Files if you are a monthly data subscriber:

      Mid Day Results Files are included in the price of your monthly download subscription. If you are downloading enough data and results files during a given calendar month to incur the monthly fee - go ahead and download as many Mid Day Result Files as you see fit. (The dollar amount of your monthly bill stays the same.)

    2. Here's how it works if you are a daily Flex Plan subscriber:

      If you are downloading data and results files for any given race day under the daily Flex Plan - you are already incurring a charge for that day. So feel free to download as many Mid Day Result Files as you want for that same day. (You won't incur any additional charges for that same day.)

      Because the Mid Day Results File contains chart results for every track running each day:

      If you DO download Mid Day Result Files under the Flex Plan -- you WILL be charged for that day.

      Are we clear?


    That said, here are the BASIC OPERATING INSTRUCTIONS for Downloading the Mid Day Results File:
    1. Run the IE/WinInet Clear Cache MENU item first.

    2. Launch the HDW File Download Tool.

    3. Click the Mid Day Results File button to queue up the file.

    4. Click the Download button to download the file.

    5. And finally, navigate to DataFolder1 and unzip the file.

    That's It!


    -jp

    .



    <-- Back to Table of Contents


    BASIC STUFF YOU NEED TO BE AWARE OF:


    This section of the help doc is still being written.

    Check back frequently for updates...

    -jp

    .





    Final Thoughts and Comments:

    This section of the help doc is still being written.

    Check back frequently for updates...

    -jp

    .

























    Copyright 2008 JCapper Software              http://www.JCapper.com