kw_rock Posted May 9, 2006 Share Posted May 9, 2006 (edited) I have a few question. First off, how do I send random letter... Say I wanted to type a random letter A through Z... I'd do Send(????) And another thing, If i wanted to read and type a random line from a file, how do I do that? Say file test.txt has 10 lines, and I want to read a random line of those. THANKS FOR THE HELP Edit: Or I want to Sleep(??) for a random amount of time between 1 second and 5 seconds Edited May 9, 2006 by kw_rock Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 9, 2006 Moderators Share Posted May 9, 2006 I have a few question. First off, how do I send random letter... Say I wanted to type a random letter A through Z... I'd do Send(????) And another thing, If i wanted to read and type a random line from a file, how do I do that? Say file test.txt has 10 lines, and I want to read a random line of those. THANKS FOR THE HELP Edit: Or I want to Sleep(??) for a random amount of time between 1 second and 5 seconds$RandomAlph = Random(Asc('A'), Asc('Z'), 1) Send(Chr($RandomAlph)) Get Beta for the 2nd question:#include <file.au3> $FileFullPath = @ScriptDir & '\Test.txt' $RandomLine = Random(1, _FileCountLines($FileFullPath), 1) $ReadLine = FileReadLine($FileFullPath, $RandomLine) MsgBox(64, 'Line Read = ' & $RandomLine, $ReadLine)That might work Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now