Sign in to follow this  
Followers 0
John404

Random keys

8 posts in this topic

#1 ·  Posted (edited)

How would I make AutoIt3 input a random send command?

For example

Send("{RANDOM}") (just an idea)

Send("{RANDOM}")

Send("{RANDOM}")

Send("{RANDOM}")

The outcome would be ojq (random keys)

Are there any methods for doing something like this?

Basically I want it to come up with a randomly generated letter and send it

Help? Thanks.

I got it to work with numbers, but not letters... which is what I need.

Edited by John404

Share this post


Link to post
Share on other sites



Something like this?

Send(RandomKeys(8)) ;Send 8 random chars
Func RandomKeys($iLen=1)
Local $Result
Local $aChars = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789","")
For $Index = 1 To $iLen
  $Result &= $aChars[Random(1,$aChars[0],1)]
Next
Return $Result
EndFunc

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Something like this?

Send(RandomKeys(8)) ;Send 8 random chars
Func RandomKeys($iLen=1)
Local $Result
Local $aChars = StringSplit("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789","")
For $Index = 1 To $iLen
  $Result &= $aChars[Random(1,$aChars[0],1)]
Next
Return $Result
EndFunc

Thank you.

@JohnOne Yeah that helped! /sarcasm

Share this post


Link to post
Share on other sites

Thank you.

@JohnOne Yeah that helped! /sarcasm

I'm afraid your sarcasm is rather poor, it's unneeded anyway.

If you can send random numbers, then you can send a random character ( Chr() )

Send(Chr(Random(65,90,1)))

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

@JohnOne Yeah that helped! /sarcasm

Have you thought of using an infinite number of monkeys?

Share this post


Link to post
Share on other sites

@czardas,

Get it right...

A random number of monkeys hitting an infinite number of keys will produce "Scripting for Dummies" within a millenium.


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Thank you.

@JohnOne Yeah that helped! /sarcasm

No better way to ensure you will receive no further assistance ;)


√-1 2^3 ∑ π, and it was delicious!

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