I decided a work-around would solve my problem and will study further later...
It's so frustrating to see how easy it is done in AutoIt and Phantom Test Driver (which is what I ended up using).
[Deleted website, has been changed.]
Basically, I had a “ton” of disks that contained .dtb files, 542 to be exact.
I know this is simplistic and I have only written out the gist of what I did to solve.
These files are in a proprietary format requiring the use of Teradyne’s software, as far as I know there is no scripting or command line method for using this software.
I am not sure if I ended up using all of these assemblies, but here’s the list:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
My first task was to locate all the .dtb files on the CD and transfer them to a working folder, folder structure intact. (Because there were duplicate filenames in different folders) To do this I used Beyond Compare.
This folder becomes the base folder, lblDrive.txt. It actually includes the whole path.
string[] rawInput = Directory.GetFiles(lblDrive.Text, "*.dtb*", SearchOption.AllDirectories);
//lblDTBFilesFound
int dtbCount = 0;
foreach (string s in rawInput)
{
lstFilesList.Items.Add(s.ToString());
dtbCount++;
}
lblDTBFilesFound.Text = "DTB Files Found: " + dtbCount.ToString();
// create a list of all .dtb files including their complete path.
// file count can be used later to ensure you converted all the files.
Iterate through the list copying each entry to wrkString, which is a full path to a .dtb file
Clipboard.SetText(wrkString.Substring(0, q));
// Copy everything but the file extension to the clipboard
Process.Start(wrkString); // launching proprietary software
int maybe = 0;
while (maybe < 25)
{
System.Threading.Thread.Sleep(10);
maybe++;
}
// give a bit of a delay to ensure app has started
var process = Process.Start("DTB_Extraction.psc");
process.WaitForExit();
• Launches phantom.exe (.psc previously associated with phantom.exe manually)
• Script executes the mouse moves and clicks to convert the file
• Script includes a paste from clipboard into file save
• Forces a wait until the script finishes
if(File.Exists(wrkString.Substring(0, q) + ".csv"))
{
// Do nothing
}
else
{
lstDisp.Items.Add(wrkString.Substring(0, q) + ".csv");
}
// In the rare case something went wrong and the .csv wasn’t created
string[] rawInput = Directory.GetFiles(lblDrive.Text, "*.csv*", SearchOption.AllDirectories);
int dtbCount = 0;
foreach (string s in rawInput)
{
lstFilesList.Items.Add(s.ToString());
dtbCount++;
}
lblCSVFilesFound.Text = "CSV Files Found: " + dtbCount.ToString();
// create a list of all .csv files in the working directory, so I can iterate through it and extract the data I needed.
// File counts can be compared.