Jump to content

Unable to read text from file


Recommended Posts

This is awful sorry!

#include <string.au3>

$file = FileOPen("DAT62230.4AT",16)
$data = StringReplace(FileRead($file),"00","")
$data= BinaryToString($data)
FileClose($file)
;FileWrite("temp.txt",$data)

$number = StringRegExp($data,"[0-9]{6}[Y]",1)
If IsArray ($number) then $number = StringtrimRight($number[0],1)
$sampleReport = _StringBetween($data,Chr(03) & "…", " ")
If IsArray($sampleReport) then $sampleReport = $sampleReport[0]
$name = _StringBetween($data,"2_"," ¨")
If IsArray($name) then $name = StringtrimLeft($name[0],2)

Msgbox(0,"",$name & @crlf & $sampleReport & @crlf &  $number)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...