Jump to content
Sign in to follow this  
ScriptingN00blet

Write Random Characters to test file

Recommended Posts

ScriptingN00blet

I want to start AutoIt and understand for you setups commands, I just can't figure out what commands I need.

I want to make a script that will create a new text file named "random.log" on the desktop and then write 12 random characters of text or numbers to the file.

I was looking under functions and found random. I figured I'd incorporate one of there random letter and random number commands into a script that would right them to a file. I can't figure out how to do it. =[

Share this post


Link to post
Share on other sites
monoceres

Welcome to the forums :)

I made the script for you, enjoy :(

For $i=1 To 12 ; Loops 12 times
    Do
        $t=Random(48,90,1)
    Until Not ($t>=58 And $t<=64) ; Read the ASCII table to see why I did this
    FileWrite("random.log",Chr($t)) ; Writes the char to the file
Next

:D


Broken link? PM me and I'll send you the file!

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  

×