Scripts | Mining University

Scripts

This is the real reason that I started this website.  I wanted an excuse to sit around and write scripts all day and I needed a place to share them.  I am not a professional programmer, so the code quality may not be the best, but I am doing this for fun and I hope you have fun here too.  My favorite scripting languages are Lava (a Vulcan application of Perl), Visual Basic (usually for Excel) and, most recently, batch files.

The first script that I thought of sharing was actually a batch file.  It is intended to alert you when your computer has completed a process that takes a long time.  Other scripts followed and now, here they are. 

Blast Hole Depth by Triangulation Surfaces: This script evolved from the generic 'Blast Hole Depth' script. Originally the script was intended to drill to a certain depth in order to keep the bench floor on grade. Later there was a desire to give blast hole depths along ramps. This necessitated a change to the script so that it would give the depth between two surfaces. This will still help keep bench floors on grade but will necessitate two surface triangulations (a before and after mining of the bench) in order to run the script.

Blast Hole Depth: The drill and blast tools in Vulcan have the ability to assign depth to drillholes based on collar elevation and a target depth. I needed a way to do this without the additional module so I wrote this script. There may be an update to this lava file soon that will assign depth based on a target surface, not just a toe depth.

Chronos Mine Plan Destination Script: Chronos is a powerful mine planning tool, but the format of the ‘destination’ tab leaves much to be desired.  The following script copies the results in the Chronos destination, into a new tab, in a format that allows for the creation of reports and pivot tables with familiar Microsoft Excel tools.

Complete: Batch file script that monitors CPU usage and plays an alert sound when the usage drops below 5% for 5 seconds in a row.  Intended to alert the user when long processes (like grade estimation) are complete.

Chronos - Sum Product: VBA script for Excel.  Multiplies each 'WEIGHT' type fields by their corresponding mass fields and inserts the results as a new column with the suffix 'Contained.'  I discovered that I was manually doing this every time I created a new Chronos workbook (all the way back to Vulcan version 6) so I decided to automate it.  I hope I am not the only person in the world that found the process tedious.