Jump to content
Sign in to follow this  
VicTT

Raw read trouble

Recommended Posts

VicTT

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
VicTT

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
jpm

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.