cammy9.9 Posted November 7, 2006 Share Posted November 7, 2006 Hi im working on a game and i need a my script to press any keys on the keyboard ramdony i know how to make it to press the keys but not ramdony can any one help plz Link to comment Share on other sites More sharing options...
PaulIA Posted November 7, 2006 Share Posted November 7, 2006 Hi im working on a game and i need a my script to press any keys on the keyboard ramdony i know how to make it to press the keys but not ramdony can any one help plzMaybe something to do with the Random function? Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
cammy9.9 Posted November 7, 2006 Author Share Posted November 7, 2006 would that work? if it does thx Link to comment Share on other sites More sharing options...
cammy9.9 Posted November 7, 2006 Author Share Posted November 7, 2006 i looked in the help file and thats for floting point numbers i need it to send a ramdon leter Link to comment Share on other sites More sharing options...
PaulIA Posted November 7, 2006 Share Posted November 7, 2006 i looked in the help file and thats for floting point numbers i need it to send a ramdon leterYou didn't look close enough in the help file then, because you can return Integer numbers as well. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Richard Robertson Posted November 7, 2006 Share Posted November 7, 2006 (edited) We are here to answer the questions you ask. The only question you asked was "would that work?" Yes, it will work. Edited November 7, 2006 by Icekirby1 Link to comment Share on other sites More sharing options...
DrEvil Posted November 7, 2006 Share Posted November 7, 2006 each letter can be converted to an Ascii code. So once you have a random number convert it to it's equivalent number. Am I clear? no? $RandomNumber= Random ( 97,122,1) $Letter= Chr ($RandomNumber) this gets a random integer number between 97 and 122 (check the help file for the correct ascii table) and the converts it to a letter (lower case) DrEvil "When I get angry, Mr. Bigglesworth gets upset. And when Mr. Bigglesworth gets upset... people die!" --DrEvil Link to comment Share on other sites More sharing options...
cammy9.9 Posted November 7, 2006 Author Share Posted November 7, 2006 so how would i get it to send a ramdon letter in notepad? Link to comment Share on other sites More sharing options...
PaulIA Posted November 7, 2006 Share Posted November 7, 2006 You can also just use the actual ASCII values: ConsoleWrite(Chr(Random(Asc("A"), Asc("Z"), 1)) & @CR) Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
cammy9.9 Posted November 7, 2006 Author Share Posted November 7, 2006 ok thx i did it Link to comment Share on other sites More sharing options...
DrEvil Posted November 7, 2006 Share Posted November 7, 2006 (edited) so how would i get it to send a ramdon letter in notepad?Look in the help files:SendSend Key List(do some homework. we can help, but we won't do it for you)EDIT : "Oops too slow" Good Luck! Edited November 7, 2006 by DrEvil "When I get angry, Mr. Bigglesworth gets upset. And when Mr. Bigglesworth gets upset... people die!" --DrEvil 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