Sign in to follow this  
Followers 0
cammy9.9

need help with a script plz

11 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Maybe something to do with the Random function?

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

would that work? if it does thx :whistle:

Share this post


Link to post
Share on other sites

i looked in the help file and thats for floting point numbers i need it to send a ramdon leter

Share this post


Link to post
Share on other sites

i looked in the help file and thats for floting point numbers i need it to send a ramdon leter

You 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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

We are here to answer the questions you ask.

The only question you asked was "would that work?"

Yes, it will work.

Edited by Icekirby1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

so how would i get it to send a ramdon letter in notepad?

Share this post


Link to post
Share on other sites

ok thx i did it :whistle:

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

so how would i get it to send a ramdon letter in notepad?

Look in the help files:

Send

Send Key List

(do some homework. we can help, but we won't do it for you)

EDIT : "Oops too slow" Good Luck!

Edited by DrEvil

"When I get angry, Mr. Bigglesworth gets upset. And when Mr. Bigglesworth gets upset... people die!" --DrEvil

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