macro Open_LeCroy/U;
var
	boolean : good,isByte;
	integer : refNum,commType;
	longint : width,dataSize,rsrcSize,dataOffset;
	str255 : fName;
begin
	DisposeUnClose;
	fName:='';
	good:=GetFile('Select an File...',fName);
	if (good) then
		FileSize(fName,dataSize,rsrcSize);
		OpenFile(fName,refNum);

		OffsetFile(refNum,TRUE,32);
		ReadFile(refNum,commType,0);
		ConvertPC2Mac(commType);
		isByte:=Cmp(commType,=,1);

		OffsetFile(refNum,TRUE,92);
		ReadFile(refNum,width,4);
		ConvertPC2Mac(width);

		CloseFile(refNum);
		if(isByte)
			dataOffset:=EvalNumber(dataSize,-,width);
			ReadBinaryOptions(width,1,dataOffset,'Byte',TRUE);
		elseif
			dataOffset:=EvalNumber(dataSize,-,width,-,width);
			ReadBinaryOptions(width,1,dataOffset,'Integer',TRUE);
		endif;
		OpenData(fName,'Binary',FALSE);
	endif;
end;

