Sign in to follow this  
Followers 0
VicTT

Raw read trouble

3 posts in this topic

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[/quote]

Share this post


Link to post
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[/quote]

Share this post


Link to post
Share on other sites

fix I think with 3.1.1.93. Unless you really need a fix you have to wait the next beta upload by the week :P

Share this post


Link to post
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
Sign in to follow this  
Followers 0