Jump to content

Raw read trouble


VicTT
 Share

Recommended Posts

Dim $drive="\\.\A:"
$handle=FileOpen($drive,4)
while @error<>-1
$read=FileRead($handle,512)
FileWrite("get.drv",$read)
wend

This bit should read the whole floppy in and write it to a file..Wrong...after 110 sectors, it DOES NOT error out..It just continues to read the floppy but write nothing...The floppy is being read because the sound is obvious...

Also...

Special: Sets @error to -1 if end-of-file is reached.

This is a most probably a bug..the floppy DOES have bad sectors on it, but AutoIt doesn't seem to mind...
Quote

Together we might liveDivided we must fall

 

Link to comment
Share on other sites

What I've noticed by using this bit of code:

Dim $drive="\\.\A:"
$handle=FileOpen($drive,4)
$i=0
while @error<>-1
$i+=1
$read=FileRead($handle,512)
Msgbox(0,"","Sector "&$i&": "&@LF&String($read))
FileWrite("get.drv",$read)
wend

It'll just keep reading...and msgboxing stuff like 0x12AF0002...........until it simply reads out 512 Chr(F6)'s...no binary string, no nothing...The doc needs to be fixed, and the function also...

Quote

Together we might liveDivided we must fall

 

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...