Sign in to follow this  
Followers 0
myxomatosii

Trying to remember a function/macro? name..

6 posts in this topic

Hi there, basically a few years ago I was playing around with testing hard drive writing speed with AutoIt but I cannot for the life of me remember how I did it. I'll describe the outcome and perhaps someone here can remind me.

Using Filewrite and a simple 'while 1' loop look I would create a text file whose contents contained only.

-y

-y

-y

-y

-y

-y

-y

-y

-y

-y

and so on, forever. The speed that it would flood was immense and I am not able to replicate it, coming back to this project.

If anyone can lead me back to whatever I sent to the

Filewrite("textfile.txt, [i forgot what goes here]"

I would be happy. Thanks all for reading.

hints and fragments of memory tell me to try things like

yes

/y

-yes

true

but I haven't recalled what it actually was yet..

Share this post


Link to post
Share on other sites



Will write as many times as it can in 1 second. But this method is questionable at measuring "hard drive writing speed".

$timer = timerinit ()

$test = Fileopen ("test.txt" , 2)

while timerdiff($timer) < 1000
    filewrite ($test , "-y" & @CRLF)
WEnd

msgbox (0, '' , 'done')


exit

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Will write as many times as it can in 1 second. But this method is questionable at measuring "hard drive writing speed".

$timer = timerinit ()

$test = Fileopen ("test.txt" , 2)

while timerdiff($timer) < 1000
    filewrite ($test , "-y" & @CRLF)
WEnd

msgbox (0, '' , 'done')


exit

I don't pretend to know what I am doing. I am not a programmer, but a hobbyist who likes to automate tasks and see however I can manipulate my computer to get a good laugh! Sometimes I find useful things along the way :graduated: I used to blow up files with this ate a rate that was riiidiculous and it just irked me so much not to be able to remember how to do it.

By measuring hard drive speed, I never quantified it, I just would run different delays and see how long my computer would take to respond and update the file size. I'm just an experimentalist.. which is why I have to keep two operating systems at all times in case something screws up..

Share this post


Link to post
Share on other sites

Please dont believe that I am pretending either, my skills are quite lacking. i just know the scripts I have seen generally do some sort of large file copy, rather than large file write to measure.

is the snippet what you were after?


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

Please dont believe that I am pretending either, my skills are quite lacking. i just know the scripts I have seen generally do some sort of large file copy, rather than large file write to measure.

is the snippet what you were after?

Yes, I believe it has helped me on the way. I did a test run of it and it was not *precisely* how I recall but it was exponentially (literally) faster than my efforts without your assistance. I will take what I have learned from you and combine it with my natural knack for making things confusing and go from there :graduated:

Thank you so much ~

Share this post


Link to post
Share on other sites

I will take what I have learned from you and combine it with my natural knack for making things confusing and go from there

con·clu·sion

a reasoned deduction or inference.

$x =10; times to run
$file = @TempDir & "test.txt"
dim $1[$x]
For $i = 1 To $x
    $timer = TimerInit()
    $test = FileOpen($file, $x)
    While TimerDiff($timer) < $i * 1000
        FileWrite($test, "-y" & @CRLF)
    WEnd
    FileClose($test)
    $Size = FileGetSize($file)
    $1[$i - 1] = Round($Size / 1024, 2)
    MsgBox(0, 'Done! ' & $1[$i - 1], 'SiZe = ' & Round($Size / 1024, 2) & " KB" & @CRLF & 'After ' & $i & ' try(s)!', .5)
Next
FileDelete($file)
MsgBox(0, 'Conclusion:', 'HDD is slower by ' & round(($1[$x-1]/$x )- $1[0], 1) & ' KB after ' & $x & ' Run(s)'& @crlf & ' ..... or is the file just getting bigger?', 15)
Exit

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