Sign in to follow this  
Followers 0
Skrip

Random Send (letters)

18 posts in this topic

Can somebody make me a script so when i activate it, it will randomly send a letter. When I press esc it will turn off, thanks Please reply soon.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites



Can somebody make me a script so when i activate it, it will randomly send a letter. When I press esc it will turn off, thanks Please reply soon.

This is a joke right ?

What about trying to do it yourself since it sounds pretty simple?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I know how to do a random send, but not with using letters. Other wise I would do it myself.

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Well how do you do your random send? That's a start.

Share this post


Link to post
Share on other sites

I know how to do a random send, but not with using letters. Other wise I would do it myself.

Letters ascii values range from 65-90 for A-Z and 97-122 for a-z

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Well how do you do your random send? That's a start.

Send(random)

Func Random()
Send(". " & Random(0, 99, 1) )
EndFunc

Letters ascii values range from 65-90 for A-Z and 97-122 for a-z

So how could I do that ^ with the code above? Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

u could always make an array with the characters in it... and do something like send($Array[random(0, 50, 1)])

that will work...

example:

Dim $AlphaB[5]
$AlphaB[0] = "a"
$AlphaB[1] = "b"
$AlphaB[2] = "c"
$AlphaB[3] = "d"
$AlphaB[4] = "e"

Send($AlphaB[Random(0, 4, 1)])


;or


$Letter = Asc(random(67, 90, 1)); something like that
Edited by CHRIS95219

Share this post


Link to post
Share on other sites

Send(random)

Func Random()
Send(". " & Random(0, 99, 1) )
EndFunc

So how could I do that ^ with the code above?

Heres one way of doing it... by the way, you shouldn't give your Func that name of an existing internal function...

Func SendRandom()
    Do 
        $RandChar = Random(65, 122, 1)
    Until $RandChar < 91 Or $RandChar > 96
    Send(". " & Chr($RandChar))
EndFunc

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Post #7 Worked

Post #8 (the one above) worked also

GOOD JOB AND THAT YOU PEOLE!

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

whats about:

For $i = 1 To 100 Step 1
    If Random() = 0 Then
        $letter = Random(65, 90)
    EndIf
    Else
        $letter = Random(97, 122)
    EndIf
    Send(Chr($letter))
Next

Sends 100 letters... if you want it to be run until you press ESC take this:

HotKeySet("{ESC}", "Exit1")

While 1
    If Random() = 0 Then
        $letter = Random(65, 90)
    EndIf
    Else
        $letter = Random(97, 122)
    EndIf
    Send(Chr($letter))
WEnd

Func Exit1()
    Exit
End Func
Edited by Lord_Doominik

Share this post


Link to post
Share on other sites

That one seems to work very well also. Thank you everybody I got it working


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

I don't see anything in that, that says anything about letters


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Having trouble reading?

;Random letter
If Random() < 0.5 Then
   ;Capitals
    $Letter = Chr(Random(Asc("A"), Asc("Z"), 1))
Else
   ;Lower case
    $Letter = Chr(Random(Asc("a"), Asc("z"), 1))
Endif

Share this post


Link to post
Share on other sites

Hmm, guess I missed that part. But anyway thanks to the people that helped. Now I won't fail Language arts. (Don't ask, it's for a project we are doing)


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

lol. I've never seen that part of the random function either....

Share this post


Link to post
Share on other sites

I think people see the long description of how it works, and don't bother reading through all the stuff. Although, since they ought to know that there are always code examples at the end, they should read through the whole code section...

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