top of page
  • May 8, 2017

You can download free scripting software here called AutoHotKey. After AutoHotKey is installed you'll find that you can right click on your desktop or inside a folder, select New, and then pick an option for 'AutoHotKey Script'. A file will be created with the extension, 'ahk'.

AutoHotKey can be used to do many things. This is an example of a very basic script:

After saving this script in a new file and double-clicking on it, a new command will be added so that the text 'Litigation Support Tip of the Night' will pasted when you press CTRL + J.


 
 
  • Apr 26, 2017

I've posted quite few batch commands to this site in the past, including the very first Tip of the Night on April 10, 2015, which showed how to use the DOS batch command dir to get a list of files in a folder.

WinBatch is a scripting language that uses DOS batch commands with the Basic and C scripting languages. There is a WinBatch tech database in which you can find scripts to accomplish a variety of common tasks, and a trial version of WinBatch Navigator can be downloaded for free here, http://www.winbatch.com/download.html .

So if you open WinBatch Navigator and click on the WinBatch Studio utility, a script editor will open. You can copy scripts from the tech database, enter them in the editor and then save them as files with a .wbt extension.

A script such as this one:

;Count lines in a file - one way anyway fn="C:\test\filename.txt" count=0 handle=FileOpen(fn,"READ") While @TRUE line=FileRead(handle) If line=="*EOF*" Break Else count=count+1 EndIf EndWhile FileClose(handle) Message("Lines in the file",count)

. . . will count the number of lines in text file listed on the second line.

So for this text file:

. . . we get this result:


 
 

There are many Java scripts available that can assist you with data analysis. Running a java script is quite easy - they run in a web browser when embedded in a html file.

This sample Java 'Digital clock' script can be found here

<html> <head> <title>Javascript Digital Clock - An example of a Timer</title>

<script language="javascript" type="text/javascript">var dateform speed=1000 tid=0;function dodate(){f.date.value=new Date();tid=window.setTimeout("dodate()",speed);}function start(x){f=x tid=window.setTimeout("dodate()",speed);}function cleartid(){window.clearTimeout(tid);}</script>

</head>

<body onload="start(document.dateform) ;"> <center> Digital Clock <FORM name="dateform" action="post"> <input type="text" name="date" size=30> </FORM> </center>

<br><br> <a href="jsindex.html"> More java script examples </a> <br>

</body> </html>

. . . it can be pasted into a text file [make sure the returns appear in the right places] and then save and change the extension to .html. Depending on your settings in Windows, simply clicking on the file should open it in Internet Explorer. You will likely get a warning that running scripts are restricted and be prompted by IE to allow block content. Click 'Allow blocked content' and let the script run.

You should get a result that looks just like the below, where I have embedded the Java script

If a Java script is not embedded in an html file, you can run it by downloading Node, from this site, https://nodejs.org/en/ . Once Node is installed, you should find it your Programs menu Open it and simply type in:

node C:\folder\hello.js

Java scripts not embedded in html files are saved with the extension .js.


 
 

Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page