#!/usr/bin/perl -w #xcalibur automation test script use strict; use Win32::OLE; use Win32::OLE::Const 'XRawfile2 1.0 Type Library'; #specify a data file and create the object my $rawFile = 'C:\Xcalibur\Data\oligo01.raw'; my $XRawfile = new Win32::OLE('Xrawfile.XRawfile.1') or die "yikes, can't instantiate object\n"; #read back the object my $obj = Win32::OLE->QueryObjectType($XRawfile); #this line returns "IXRawfile", everything appears ok print "object type = $obj\n"; #open a file into the XRawfile object $XRawfile->Open("$rawFile"); #this line seems to indicate everything is ok as it doesn't return an error test_for_error(); #try to readback the file we just loaded #alas this appears to suck pond water - doesn't work my $filename = ""; $XRawfile->GetFileName($filename); test_for_error(); print "the file is: $filename\n"; #sub that prints an error if encountered sub test_for_error { my $error = Win32::OLE->LastError(); print $error if $error; }